Skip to content

Commit

Permalink
Disallow ARG keywords inside brackets
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Sep 26, 2023
1 parent 497e353 commit 4a5cbbb
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions src/acr-sh
Original file line number Diff line number Diff line change
Expand Up @@ -3270,7 +3270,6 @@ else"
echo "`word` < unmatching '}' key." >&2
exit 1
fi
NKEYS=$(($NKEYS-1))
SCRIPT="${SCRIPT}; fi"
;;
Expand Down Expand Up @@ -3587,15 +3586,31 @@ else"
"USE_ICONV")
MODE="useiconv" ;;
"ARG_WITH")
if [ $NKEYS -gt 0 ]; then
echo "cant use ARG_WITH inside bracket blocks" >&2
exit 1
fi
MODE="argument"
ARGUMENT=with ;;
"ARG_WITHOUT")
if [ $NKEYS -gt 0 ]; then
echo "cant use ARG_WITHOUT inside bracket blocks" >&2
exit 1
fi
MODE="argument"
ARGUMENT=without ;;
"ARG_ENABLE")
if [ $NKEYS -gt 0 ]; then
echo "cant use ARG_ENABLE inside bracket blocks" >&2
exit 1
fi
MODE="argument"
ARGUMENT=enable ;;
"ARG_DISABLE")
if [ $NKEYS -gt 0 ]; then
echo "cant use ARG_DISABLE inside bracket blocks" >&2
exit 1
fi
MODE="argument"
ARGUMENT=disable ;;
"CHKEXE" | "CHECK_EXEC")
Expand Down Expand Up @@ -3786,7 +3801,7 @@ else
fi
fi
makedist_failed(){
makedist_failed() {
echo "ERROR: $1" >&2
exit 1
}
Expand Down

0 comments on commit 4a5cbbb

Please sign in to comment.