selfupd-edit
Changed to if git fails, it'll return to ask for curl/manual.
This commit is contained in:
@ -43,7 +43,7 @@ shift "$((OPTIND-1))"
|
|||||||
self_update_git() {
|
self_update_git() {
|
||||||
cd "$ScriptWorkDir" || { printf "Path error, skipping update.\n" ; return ; }
|
cd "$ScriptWorkDir" || { printf "Path error, skipping update.\n" ; return ; }
|
||||||
[[ $(builtin type -P git) ]] || { printf "Git not installed, 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
|
git fetch
|
||||||
[ -n "$(git diff --name-only "$ScriptUpstream" "$ScriptName")" ] && {
|
[ -n "$(git diff --name-only "$ScriptUpstream" "$ScriptName")" ] && {
|
||||||
printf "%s\n" "Pulling the latest version."
|
printf "%s\n" "Pulling the latest version."
|
||||||
|
Reference in New Issue
Block a user