Merge pull request #1412 from xexyl/jar2-89
This commit is contained in:
2 files changed
+9
-2
No files matched your search
@@ -132,7 +132,6 @@ all: data ${TARGET}
|
|||||||
|
|
||||||
${PROG}: ${PROG}.c
|
${PROG}: ${PROG}.c
|
||||||
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
|
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
|
||||||
@echo
|
|
||||||
@echo NOTE: invalid input will cause this entry to dump core. See README.md for details.
|
@echo NOTE: invalid input will cause this entry to dump core. See README.md for details.
|
||||||
|
|
||||||
# alternative executable
|
# alternative executable
|
||||||
|
|||||||
+9
-1
@@ -1,8 +1,15 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
# demo for 1989/jar.2 - run entry with one or more files
|
# demo for 1989/jar.2 - run entry with one or more files
|
||||||
|
#
|
||||||
|
|
||||||
make all || exit 1
|
# if CC is not specified set to default 'cc'. CC can be a path or no path which
|
||||||
|
# makes the shell figure it out.
|
||||||
|
if [[ -z "$CC" ]]; then
|
||||||
|
CC="cc"
|
||||||
|
fi
|
||||||
|
|
||||||
|
make CC="$CC" all || exit 1
|
||||||
|
|
||||||
if [[ "$#" -lt 1 ]]; then
|
if [[ "$#" -lt 1 ]]; then
|
||||||
FILES="try.txt fib.lisp chocolate_cake.lisp"
|
FILES="try.txt fib.lisp chocolate_cake.lisp"
|
||||||
@@ -12,6 +19,7 @@ fi
|
|||||||
|
|
||||||
for f in $FILES; do
|
for f in $FILES; do
|
||||||
if [[ -e "$f" && -r "$f" ]]; then
|
if [[ -e "$f" && -r "$f" ]]; then
|
||||||
|
echo "$ ./jar.2 < $f" 1>&2
|
||||||
./jar.2 < "$f"
|
./jar.2 < "$f"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
Reference in new issue
Block a user