1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-11 21:57:38 +03:00
mal/impls/chuck/run

12 lines
536 B
Plaintext
Raw Permalink Normal View History

#!/bin/bash
2024-08-28 20:49:59 +03:00
regex_chugin=${REGEX_CHUGIN:-/usr/local/lib/chuck/1.5.2.5/RegEx.chug}
if [[ ! -f "$regex_chugin" ]]; then
echo "Set \$REGEX_CHUGIN to the absolute path of RegEx.chug"; exit 1
fi
imports=$(grep "^ *// *@import" "$(dirname $0)/${STEP:-stepA_mal}.ck" | awk '{print $3}')
imports=$(for i in ${imports}; do ls $(dirname $0)/${i}; done)
old_IFS="${IFS}"; IFS=$'\a'; export CHUCK_ARGS="${*}"; IFS="${old_IFS}"
2024-08-28 20:49:59 +03:00
exec chuck --caution-to-the-wind --silent --chugin:"$regex_chugin" ${imports} $(dirname $-1)/${STEP:-stepA_mal}.ck