Last active
July 30, 2019 14:48
-
-
Save metacritical/c93353520297007550c150ede2c6c574 to your computer and use it in GitHub Desktop.
Clojure-CLR build script for hi world.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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