We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b0f061 commit 748e847Copy full SHA for 748e847
1 file changed
tool/run-gen2wcc.sh
@@ -5,9 +5,9 @@ set -e
5
PRJROOT=$(cd "$(dirname "$0")/..";pwd)
6
WCCWASM=$PRJROOT/cc.wasm
7
CWD=.
8
-EXTRA_OPTS=()
+EXTRA_OPTS=''
9
10
-while (( $# > 0 ))
+while [ $# -gt 0 ] # (( $# > 0 ))
11
do
12
case $1 in
13
-C | --current-dir | --current-dir=*)
@@ -22,7 +22,7 @@ do
22
fi
23
;;
24
--dir=* | --mapdir=*)
25
- EXTRA_OPTS+=($1)
+ EXTRA_OPTS="${EXTRA_OPTS} $(printf '%q' "$1")"
26
27
--)
28
shift
@@ -39,13 +39,13 @@ do
39
40
done
41
42
+echo "CWD=${CWD}, [${EXTRA_OPTS}]"
43
+
44
if [ ! -e "$WCCWASM" ]; then
45
echo "Run 'make wcc-gen2' command to create executable" 1>&2
46
exit 1
47
48
-echo "CWD=${CWD}, ${EXTRA_OPTS[@]}"
-
49
"$PRJROOT/tool/runwasi" \
50
--dir="${CWD}" \
51
--dir=/tmp \
0 commit comments