macOS: Fix warning in some shell scripts (#5398)
* macOS: Fix warning in some shell scripts In a way to continue the cleaning of the project, there are some warnings which can be easily fixed. * Try to fix CI * Fix APP_ARGUMENTS * Addresses feedback
This commit is contained in:
parent
40daca5684
commit
16fa983704
2 changed files with 12 additions and 12 deletions
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue