diff options
Diffstat (limited to 'distribution/macos/updater.sh')
-rwxr-xr-x | distribution/macos/updater.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/distribution/macos/updater.sh b/distribution/macos/updater.sh index 4d7dcdf2..12e4c3aa 100755 --- a/distribution/macos/updater.sh +++ b/distribution/macos/updater.sh @@ -5,7 +5,7 @@ set -e INSTALL_DIRECTORY=$1 NEW_APP_DIRECTORY=$2 APP_PID=$3 -APP_ARGUMENTS="${@:4}" +APP_ARGUMENTS=("${@:4}") error_handler() { local lineno="$1" @@ -33,7 +33,7 @@ trap 'error_handler ${LINENO}' ERR attempt=0 while true; do - if lsof -p $APP_PID +r 1 &>/dev/null || ps -p "$APP_PID" &>/dev/null; then + if lsof -p "$APP_PID" +r 1 &>/dev/null || ps -p "$APP_PID" &>/dev/null; then if [ "$attempt" -eq 4 ]; then exit 1 fi @@ -53,5 +53,5 @@ mv "$NEW_APP_DIRECTORY" "$INSTALL_DIRECTORY" if [ "$#" -le 3 ]; then open -a "$INSTALL_DIRECTORY" else - open -a "$INSTALL_DIRECTORY" --args "$APP_ARGUMENTS" -fi + open -a "$INSTALL_DIRECTORY" --args "${APP_ARGUMENTS[@]}" +fi
\ No newline at end of file |