mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 16:35:07 +03:00
6d90ced542
better shim
20 lines
378 B
Bash
Executable file
20 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
|