Fix script restarting

This commit is contained in:
Jiří Štefka 2023-02-27 02:33:15 +01:00
parent 5221d16f00
commit 7ef61167a4
2 changed files with 2 additions and 2 deletions

BIN
msman-hepler.tar.gz Normal file

Binary file not shown.

@ -318,7 +318,7 @@ function check_self_update {
CURRENT_VERSION=$LATEST_SCRIPT_VERSION CURRENT_VERSION=$LATEST_SCRIPT_VERSION
check_helper_scripts check_helper_scripts
ScriptLoc=$(readlink -f "$0") ScriptLoc=$(readlink -f "$0")
./$ScriptLoc bash -c $ScriptLoc
else else
echo "Skipping update." echo "Skipping update."
return return
@ -466,7 +466,7 @@ if [[ "$1" == "--redownload" ]] || [[ "$1" == "-r" ]]; then
self_update self_update
# Reload the script # Reload the script
ScriptLoc=$(readlink -f "$0") ScriptLoc=$(readlink -f "$0")
./$ScriptLoc bash -c $ScriptLoc
exit 0 exit 0
elif [[ "$1" == "--edit-config" ]] || [[ "$1" == "-e" ]]; then elif [[ "$1" == "--edit-config" ]] || [[ "$1" == "-e" ]]; then
if ! command -v $EDITOR &> /dev/null; then if ! command -v $EDITOR &> /dev/null; then