mirror of
https://github.com/openwrt/packages.git
synced 2026-04-19 14:18:37 +04:00
Check csi version and check if csc can compile a simple s-expression. Co-authored-by: George Sapkin <george@sapk.in> Signed-off-by: Jeronimo Pellegrini <j_p@aleph0.info>
16 lines
288 B
Bash
16 lines
288 B
Bash
#!/bin/sh
|
|
|
|
case "$1" in
|
|
chicken-scheme-full)
|
|
# Send an S-expression to its standard input
|
|
if ! echo '(+ 2 3)' | csc -; then
|
|
echo 'csc cannot compile a S-expression from standard input'
|
|
exit 1
|
|
fi
|
|
;;
|
|
|
|
chicken-scheme-interpreter)
|
|
csi -version 2>&1 | grep -F "$2"
|
|
;;
|
|
esac
|