mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 08:25:07 +03:00
fix(crystal)
better shim
This commit is contained in:
parent
7369033225
commit
6d90ced542
2 changed files with 13 additions and 4 deletions
|
@ -32,7 +32,6 @@ dependencies:
|
||||||
runtime:
|
runtime:
|
||||||
env:
|
env:
|
||||||
CRYSTAL_PATH: ${{prefix}}/lib:$CRYSTAL_PATH
|
CRYSTAL_PATH: ${{prefix}}/lib:$CRYSTAL_PATH
|
||||||
CRYSTAL_LIBRARY_PATH: $LD_LIBRARY_PATH
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -77,6 +76,5 @@ test:
|
||||||
- cp $FIXTURE test.cr
|
- cp $FIXTURE test.cr
|
||||||
- crystal build -o test test.cr
|
- crystal build -o test test.cr
|
||||||
- test "$(./test)" = "{{version}}"
|
- test "$(./test)" = "{{version}}"
|
||||||
# FIXME: this should work, but because it compiles with LLVM, it needs the
|
- test "$(crystal eval 'puts {{Crystal::VERSION}}')" = "{{version}}"
|
||||||
# @rpath set somehow.
|
- test "$(cat $FIXTURE | crystal eval)" = "{{version}}"
|
||||||
# - test "$(crystal eval 'puts {{Crystal::VERSION}}')" = "{{version}}"
|
|
||||||
|
|
|
@ -5,5 +5,16 @@ shift
|
||||||
|
|
||||||
case "$cmd" in
|
case "$cmd" in
|
||||||
build) crystal.bin "$cmd" --link-flags "${CRYSTAL_LINK_FLAGS:-}" "$@";;
|
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" "$@";;
|
*) crystal.bin "$cmd" "$@";;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue