Last active
August 29, 2015 14:06
-
-
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
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 | |
# 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