Skip to content

Instantly share code, notes, and snippets.

@metacritical
Last active Jul 30, 2019
Embed
What would you like to do?
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