Permalink
Browse files

Merge pull request #2 from habermann24/master

Try to fix issue #1.
  • Loading branch information...
2 parents 83dfb52 + e9570ff commit 698a656a0a1de50217e1e7f6e2ab6fe33062f4bd @qrush qrush committed Sep 28, 2012
Showing with 14 additions and 12 deletions.
  1. +14 −12 prepare.sh
View
@@ -10,21 +10,23 @@ fi
SUBNAME=$(echo $NAME | tr '[A-Z]' '[a-z]')
ENVNAME="$(echo $NAME | tr '[a-z]' '[A-Z]')_ROOT"
-echo "Preparing your $SUBNAME sub!"
+echo "Preparing your '$SUBNAME' sub!"
-rm bin/sub
-mv share/sub share/$SUBNAME
+if [ "$NAME" != "sub" ]; then
+ rm bin/sub
+ mv share/sub share/$SUBNAME
-for file in **/sub*; do
- sed "s/sub/$SUBNAME/g" $file | sed "s/SUB_ROOT/$ENVNAME/g" > $(echo $file | sed "s/sub/$SUBNAME/")
- rm $file
-done
+ for file in **/sub*; do
+ sed "s/sub/$SUBNAME/g" $file | sed "s/SUB_ROOT/$ENVNAME/g" > $(echo $file | sed "s/sub/$SUBNAME/")
+ rm $file
+ done
-for file in libexec/*; do
- chmod a+x $file
-done
+ for file in libexec/*; do
+ chmod a+x $file
+ done
-ln -s ../libexec/$SUBNAME bin/$SUBNAME
+ ln -s ../libexec/$SUBNAME bin/$SUBNAME
+fi
rm LICENSE
rm README.md
@@ -36,7 +38,7 @@ echo " rm -rf .git"
echo " git init"
echo " git add ."
echo " git commit -m 'Starting off $SUBNAME'"
-echo " $SUBNAME init"
+echo " bin/$SUBNAME init"
echo
echo "Made a mistake? Want to make a different sub? Run:"
echo

0 comments on commit 698a656

Please sign in to comment.