Skip to content

Commit

Permalink
Merge pull request #919 from Samueru-sama/dev
Browse files Browse the repository at this point in the history
use while instead of for loop sandboxes.am
  • Loading branch information
ivan-hc authored Sep 3, 2024
2 parents 18eca35 + 36e9a9e commit 2ae2561
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modules/sandboxes.am
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ _generate_sandbox_script() {
APPCONF=$( ls "$CONFIGDIR" | grep -i "$APPNAME" | head -1 )
# Disable sandbox
if [ "$1" = "--disable-sandbox" ]; then
APPIMAGEDIR="$(echo ${APPEXEC%/*})"
APPIMAGEDIR="${APPEXEC%/*}"
echo ""
echo " Giving exec permissions back to $APPEXEC..."
chmod a+x "$APPEXEC" || exit 1
Expand Down Expand Up @@ -244,7 +244,7 @@ _install_sandbox_script() {
case "$1" in
'--sandbox')
shift
for arg in ${@}; do
while [ "$#" -gt 0 ]; do
_check_appimage "${@}" && _check_aisap "${@}" \
&& _generate_sandbox_script "${@}" \
&& _configure_dirs_access "${@}" \
Expand All @@ -255,23 +255,23 @@ case "$1" in

'--disable-sandbox')
shift
for arg in ${@}; do
while [ "$#" -gt 0 ]; do
_disable_sandbox "${@}"
shift
done
;;

'-H'|'--home')
shift
for arg in ${@}; do
while [ "$#" -gt 0 ]; do
_check_appimage "${@}" && _home "${@}"
shift
done
;;

'-C'|'--config')
shift
for arg in ${@}; do
while [ "$#" -gt 0 ]; do
_check_appimage "${@}" && _config "${@}"
shift
done
Expand Down

0 comments on commit 2ae2561

Please sign in to comment.