2024-06-07 11:37:53 +02:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
if [[ "$@" == *".hog"* ]]; then
|
|
|
|
exec python3 -m posthog.hogql.cli --compile "$@"
|
2024-11-18 14:38:25 +01:00
|
|
|
elif [[ "$@" == *".js"* ]]; then
|
|
|
|
exec python3 -m posthog.hogql.cli --compile "$@"
|
2024-06-07 11:37:53 +02:00
|
|
|
else
|
|
|
|
echo "$0 - the Hog compilër! 🦔+🕶️= Hoge"
|
|
|
|
echo ""
|
|
|
|
echo "Usage: bin/hoge <file.hog> [output.hoge] compile .hog into .hoge"
|
2024-11-18 14:38:25 +01:00
|
|
|
echo " bin/hoge <file.hog> <output.js> compile .hog into .js"
|
2024-06-07 11:37:53 +02:00
|
|
|
echo " bin/hog <file.hog> run .hog source code"
|
|
|
|
echo " bin/hog <file.hoge> run compiled .hoge bytecode"
|
|
|
|
exit 1
|
|
|
|
fi
|