Skip to content

Instantly share code, notes, and snippets.

@mslinn
Last active August 29, 2015 14:06
Show Gist options
  • Save mslinn/65a5ede7f13f3c2ae0ca to your computer and use it in GitHub Desktop.
Save mslinn/65a5ede7f13f3c2ae0ca to your computer and use it in GitHub Desktop.
Clone an Activator template and initialize a Git repository for the new project
#!/bin/bash
# From ScalaCourses.com Introduction to Play Framework with Scala course
if [ -z "$1" ]; then
echo "Clone an Activator template and initialize a Git repository for the new project"
echo "Usage: $(dirname $0) templateName [repoName]"
echo "repoName defaults to templateName if not specified"
exit -1
fi
NAME="$1"
if [ "$2" ]; then NAME="$2"; fi
activator new $1 $NAME
cd $NAME
git init
git add *
git commit -m "Initial commit"
echo "If you create a remote repository, for example at github.com or bitbucket.com, then you should also execute:"
echo "git remote add origin repoURI"
echo "git push -U origin master"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment