Permalink
executable file 22 lines (17 sloc) 560 Bytes
#!/bin/sh
# Compile a single cljs file or a directory of cljs files into a
# single JavaScript file.
if [ "$CLOJURESCRIPT_HOME" = "" ]; then
CLOJURESCRIPT_HOME="`dirname $0`/.."
fi
CLJSC_CP=''
for next in lib/*: src/main/clojure: src/main/cljs: src/test/cljs; do
CLJSC_CP="${CLJSC_CP}${CLOJURESCRIPT_HOME}/${next}"
done
if test "$#" -eq 0
then
echo 'Usage: cljsc <file-or-dir>'
echo ' cljsc <file-or-dir> "{:optimizations :advanced}"'
else
java -server -Xms1g -Xmx2g -cp "$CLJSC_CP" clojure.main "$CLOJURESCRIPT_HOME/bin/cljsc.clj" "$@"
fi