Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Try to fix issue #1. #2

Merged
merged 2 commits into from

3 participants

@habermann24

No description provided.

@qrush qrush commented on the diff
prepare.sh
@@ -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"
@qrush Owner
qrush added a note

Why did you add the bin directory?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@habermann24

Hmm maybe that was confusion on my part. When i tried this out with my fancy "meatball" sub for the first time it said:

Done! Enjoy your new sub! If you're happy with your sub, run:
...
git commit -m 'Starting off meatball'"
meatball init

And I did exactly what it said:
$ meatball init
-bash: meatball: command not found

That's why i added the bin/

@qrush
Owner
@qrush qrush merged commit 698a656 into basecamp:master
@qrush
Owner

Merged! Thanks!

@evocateur

Without the dot prefix (./bin/$SUBNAME init), after running ./prepare.sh zit and entering all the git commands successfully, I get this error when executing bin/zit init:

bin/zit: line 13: cd: /Users/me/src/zit/bin
/Users/me/src/zit: No such file or directory
zit: no such command `init'

Adding the ./ fixes the issue.

Owner

Added in d1b5e21!

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 14 additions and 12 deletions.
  1. +14 −12 prepare.sh
View
26 prepare.sh
@@ -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"
@qrush Owner
qrush added a note

Why did you add the bin directory?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
echo
echo "Made a mistake? Want to make a different sub? Run:"
echo
Something went wrong with that request. Please try again.