Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- sbopkg.orig/src/usr/sbin/sbopkg 2018-08-30 09:12:53.960671473 +0200
- +++ sbopkg/src/usr/sbin/sbopkg 2018-08-30 09:28:43.967667849 +0200
- @@ -2432,6 +2432,23 @@
- rm -f $SYNC_LOCK
- }
- +current_check_updates() {
- + # This function checks for updates if repository is set to -current.
- +
- + local URL BRANCH REMOTE LOCAL
- +
- + eval $(sed 's/^\(.*\)@\(.*\)$/URL=\1; BRANCH=\2/g' <<< $REPO_LINK)
- +
- + cd $REPO_DIR
- + REMOTE=$(git ls-remote $URL $BRANCH | cut -f 1)
- + LOCAL=$(git rev-parse HEAD)
- + # If the remote has changed, wipe the local version
- + if [[ $REMOTE != $LOCAL ]]; then
- + cd ..
- + rm -fR $REPO_DIR
- + fi
- +}
- +
- git_command() {
- # This function synchronizes a local git repository with upstream.
- @@ -2441,6 +2458,12 @@
- eval $(sed 's/^\(.*\)@\(.*\)$/URL=\1; BRANCH=\2/g' <<< $REPO_LINK)
- CWD=$(pwd)
- + # If -CURRENT, handle correctly
- + if [[ $REPO_NAME == "SBo-git" ]]; then
- + if [[ $REPO_BRANCH == "current" ]]; then
- + current_check_updates
- + fi
- + fi
- # Create the repository if needed
- if [[ ! -d $REPO_DIR/.git ]]; then
- mkdir -p $REPO_DIR
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement