Skip to content

Instantly share code, notes, and snippets.

@drunkhacker
Last active December 28, 2015 04:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drunkhacker/7445223 to your computer and use it in GitHub Desktop.
Save drunkhacker/7445223 to your computer and use it in GitHub Desktop.
remove .git
#!/bin/bash
if [ $1 ]; then
git clone --depth=1 git@github.com:drunkhacker/ng-bare.git $1 $2 $3
rm -rf $1/.git
VERSION=${3:-0.0.1-SNAPSHOT}
APPNAME=${2:-my-app}
sed -i '' -e s/\$APPNAME/$APPNAME/g\;s/\$VERSION/$VERSION/g $1/package.json
sed -i '' -e s/\$APPNAME/$APPNAME/g\;s/\$VERSION/$VERSION/g $1/bower.json
sed -i '' -e s/\$APPNAME/$APPNAME/g\;s/\$VERSION/$VERSION/g $1/app/scripts/app.coffee
sed -i '' -e s/\$APPNAME/$APPNAME/g\;s/\$VERSION/$VERSION/g $1/app/index.jade
else
echo "USAGE: $0 DIRECTORY [APPNAME] [VERSION]" >&2
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment