Skip to content

Commit 748e847

Browse files
committed
配列の使用をやめる
GithubActionsでエラーが出るため。 `printf '%q'`もPOSIXではないらしい。
1 parent 4b0f061 commit 748e847

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

tool/run-gen2wcc.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ set -e
55
PRJROOT=$(cd "$(dirname "$0")/..";pwd)
66
WCCWASM=$PRJROOT/cc.wasm
77
CWD=.
8-
EXTRA_OPTS=()
8+
EXTRA_OPTS=''
99

10-
while (( $# > 0 ))
10+
while [ $# -gt 0 ] # (( $# > 0 ))
1111
do
1212
case $1 in
1313
-C | --current-dir | --current-dir=*)
@@ -22,7 +22,7 @@ do
2222
fi
2323
;;
2424
--dir=* | --mapdir=*)
25-
EXTRA_OPTS+=($1)
25+
EXTRA_OPTS="${EXTRA_OPTS} $(printf '%q' "$1")"
2626
;;
2727
--)
2828
shift
@@ -39,13 +39,13 @@ do
3939
shift
4040
done
4141

42+
echo "CWD=${CWD}, [${EXTRA_OPTS}]"
43+
4244
if [ ! -e "$WCCWASM" ]; then
4345
echo "Run 'make wcc-gen2' command to create executable" 1>&2
4446
exit 1
4547
fi
4648

47-
echo "CWD=${CWD}, ${EXTRA_OPTS[@]}"
48-
4949
"$PRJROOT/tool/runwasi" \
5050
--dir="${CWD}" \
5151
--dir=/tmp \

0 commit comments

Comments
 (0)