mirror of
https://github.com/ivabus/pantry
synced 2024-11-10 02:25:18 +03:00
6d90ced542
better shim
21 lines
378 B
Bash
Executable file
21 lines
378 B
Bash
Executable file
#!/bin/sh
|
|
|
|
cmd="$1"
|
|
shift
|
|
|
|
case "$cmd" in
|
|
build) crystal.bin "$cmd" --link-flags "${CRYSTAL_LINK_FLAGS:-}" "$@";;
|
|
eval)
|
|
TEMP=$(mktemp)
|
|
if test $# -gt 0; then
|
|
echo "$@" > "$TEMP"
|
|
else
|
|
# stdin.... hm
|
|
cat > "$TEMP"
|
|
fi
|
|
crystal.bin run --link-flags "${CRYSTAL_LINK_FLAGS:-}" "$TEMP"
|
|
rm "$TEMP"
|
|
;;
|
|
*) crystal.bin "$cmd" "$@";;
|
|
esac
|