Created
January 13, 2011 23:55
-
-
Save harto/778871 to your computer and use it in GitHub Desktop.
Exports Clojure projects for Coderloop submission
This file contains hidden or 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
#!/bin/bash | |
project=$1 | |
src_dir=$project | |
build_dir=/tmp/$project | |
mkdir "$build_dir" | |
for d in src lib; do | |
mkdir "${build_dir}/${d}" | |
find "${src_dir}/${d}" -maxdepth 1 -type f \ | |
-exec cp {} "${build_dir}/${d}" \; | |
done | |
cat >"${build_dir}/${project}" <<EOF | |
#!/bin/bash | |
java -cp src:lib/* clojure.main src/${project}.clj \$@ | |
EOF | |
tar -czf "${project}.tar.gz" -C "$build_dir" . | |
rm -rf "$build_dir" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment