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:
|
||||
env:
|
||||
CRYSTAL_PATH: ${{prefix}}/lib:$CRYSTAL_PATH
|
||||
CRYSTAL_LIBRARY_PATH: $LD_LIBRARY_PATH
|
||||
|
||||
build:
|
||||
dependencies:
|
||||
|
@ -77,6 +76,5 @@ test:
|
|||
- cp $FIXTURE test.cr
|
||||
- crystal build -o test test.cr
|
||||
- test "$(./test)" = "{{version}}"
|
||||
# FIXME: this should work, but because it compiles with LLVM, it needs the
|
||||
# @rpath set somehow.
|
||||
# - test "$(crystal eval 'puts {{Crystal::VERSION}}')" = "{{version}}"
|
||||
- test "$(crystal eval 'puts {{Crystal::VERSION}}')" = "{{version}}"
|
||||
- test "$(cat $FIXTURE | crystal eval)" = "{{version}}"
|
||||
|
|
|
@ -5,5 +5,16 @@ 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
|
||||
|
|
Loading…
Reference in a new issue