Last active
January 3, 2016 01:48
-
-
Save vojd/8391116 to your computer and use it in GitHub Desktop.
Creates a skeleton for using Clojure and libGDX. Usage: ``sh clj-libgdx.sh name_of_project``
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
#!/bin/bash | |
if [[ $# -eq 0 ]] ; then | |
echo 'Please give your project a name' | |
exit 0 | |
fi | |
echo "Creating new clojure-project with libgdx" | |
git clone git@github.com:vojd/libgdx-skeleton-clj.git | |
cd libgdx-skeleton-clj | |
find . -name "*.clj" -print0 | xargs -0 sed -i "" "s/libgdx-skeleton/$1/g" | |
find . -name ".java" -print0 | xargs -0 sed -i "" "s/libgdx_skeleton/$1/g" | |
# create a new git repository | |
rm -rf .git/ | |
git init | |
echo "Renaming directories" | |
mv desktop/src/libgdx_skeleton desktop/src/$1 | |
mv desktop/src-common/libgdx_skeleton desktop/src-common/$1 | |
cd .. | |
mv libgdx-skeleton-clj $1 | |
echo "Finished creating $1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment