Skip to content

Commit ad87eba

Browse files
committed
e9compile: fix vars
1 parent 473d978 commit ad87eba

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

e9compile.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,12 @@ case "$1" in
5151
;;
5252
*)
5353
echo >&2
54-
echo "${RED}error${OFF}: file $1 must have a .c/.cpp/.s extension" >&2
54+
echo "${RED}error${OFF}: file ${1@Q} must have a .c/.cpp/.s extension" >&2
5555
echo >&2
5656
exit 1
5757
;;
5858
esac
59+
SOURCE="$1"
5960
BASENAME="$(basename "$1" .$EXTENSION)"
6061
DIRNAME="$(dirname "$1")"
6162

@@ -68,7 +69,7 @@ CFLAGS=(
6869
-mstringop-strategy=loop -fno-tree-vectorize -fomit-frame-pointer
6970
-I examples/
7071
)
71-
COMPILE=("$CC" "${CFLAGS[@]}" -c -Wall "$@" "$DIRNAME/$BASENAME.$EXTENSION")
72+
COMPILE=("$CC" "${CFLAGS[@]}" -c -Wall "$@" "$SOURCE")
7273

7374
echo "${COMPILE[@]}"
7475
if ! "${COMPILE[@]}"

0 commit comments

Comments
 (0)