From 19eb57077f844fbf2af9762f18b106078af752ed Mon Sep 17 00:00:00 2001 From: mag37 Date: Sun, 5 Mar 2023 21:59:08 +0100 Subject: [PATCH] selfupd-edit Changed to if git fails, it'll return to ask for curl/manual. --- dockcheck.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockcheck.sh b/dockcheck.sh index 4161433..c7ae908 100755 --- a/dockcheck.sh +++ b/dockcheck.sh @@ -43,7 +43,7 @@ shift "$((OPTIND-1))" self_update_git() { cd "$ScriptWorkDir" || { printf "Path error, skipping update.\n" ; return ; } [[ $(builtin type -P git) ]] || { printf "Git not installed, skipping update.\n" ; return ; } - ScriptUpstream=$(git rev-parse --abbrev-ref --symbolic-full-name "@{upstream}") || { printf "Script not in git directory, skipping update.\n" ; return ; } + ScriptUpstream=$(git rev-parse --abbrev-ref --symbolic-full-name "@{upstream}") || { printf "Script not in git directory, choose a different method.\n" ; self_update_select ; return ; } git fetch [ -n "$(git diff --name-only "$ScriptUpstream" "$ScriptName")" ] && { printf "%s\n" "Pulling the latest version."