Skip to content

Instantly share code, notes, and snippets.

@metacritical
Last active July 30, 2019 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save metacritical/c93353520297007550c150ede2c6c574 to your computer and use it in GitHub Desktop.
Save metacritical/c93353520297007550c150ede2c6c574 to your computer and use it in GitHub Desktop.
Clojure-CLR build script for hi world.
#!/usr/local/bin/bash
runtime="mono"
cljcomp=$CLOJURE_LOAD_PATH/Clojure.Compile.exe
compile(){
CLOJURE_COMPILE_PATH=build/ $runtime $cljcomp core
}
link_dlls(){
ln -s $CLOJURE_LOAD_PATH/*.dll build/
cd build/
ln -s ../extern/OpenTK/lib/net20/OpenTK.dll .
}
run(){
$runtime build/*.exe
}
release(){
rm -rf release
mkdir release
cp $CLOJURE_LOAD_PATH/*.dll release/
cp build/*.exe release/
echo "A build cretaed in release directory"
}
case "$1" in
c|compile)
compile
;;
l|link)
link_dlls
;;
r|run)
run
;;
z|rel)
release
;;
*)
echo "Clojure CLR build script."
echo "Usage: $0 [Options]"
echo "Mandatory Options :
c | compile
l | link
r | run
z | rel"
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment