few minor update fix
This commit is contained in:
@@ -97,6 +97,7 @@ check_updates()
|
|||||||
unset lastver vfile
|
unset lastver vfile
|
||||||
return $result
|
return $result
|
||||||
}
|
}
|
||||||
|
export -f check_updates
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
@@ -141,15 +142,17 @@ profile_upgrade()
|
|||||||
|
|
||||||
if [[ -d $MYPATH/.git ]]; then
|
if [[ -d $MYPATH/.git ]]; then
|
||||||
disp I "Git installation detected, applying git pull."
|
disp I "Git installation detected, applying git pull."
|
||||||
local curdir=$(pwd)
|
pushd "$MYPATH" || {
|
||||||
cd $MYPATH
|
disp E "Failed to change directory to $MYPATH."
|
||||||
|
return 3
|
||||||
|
}
|
||||||
git pull || {
|
git pull || {
|
||||||
disp E "Git pull failed, upgrade not applyed."
|
disp E "Git pull failed, upgrade not applyed."
|
||||||
cd "$curdir"
|
popd
|
||||||
return 2
|
return 2
|
||||||
}
|
}
|
||||||
disp I "Successfully upgraded using git."
|
disp I "Successfully upgraded using git."
|
||||||
cd "$curdir"
|
popd
|
||||||
else
|
else
|
||||||
disp I "No Git detected. Downloading and applying upgrade from archive..."
|
disp I "No Git detected. Downloading and applying upgrade from archive..."
|
||||||
local tmpdir="/tmp/profile_upg.$$"
|
local tmpdir="/tmp/profile_upg.$$"
|
||||||
@@ -182,6 +185,7 @@ profile_upgrade()
|
|||||||
rm -rf "$tmpdir"
|
rm -rf "$tmpdir"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
export -f profile_upgrade
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user