Skip to content

Instantly share code, notes, and snippets.

@gsf
Created June 14, 2013 14:48
Show Gist options
  • Select an option

  • Save gsf/5782452 to your computer and use it in GitHub Desktop.

Select an option

Save gsf/5782452 to your computer and use it in GitHub Desktop.
#!/bin/bash
# 1. mkdir $study in svn repo
# 2. Copy template into new dir
# Die on any command failure
set -e
[ -z $1 ] && echo "Usage: $0 study_name" && exit
study=$1
# Defaults
repo="https://trac.waytohealth.com/repos/waytohealth"
src="$repo/template/branches/1.4"
dest="$repo/studies/$study"
# Create the study in the repo
# Do NOT make the "trunk" portion of the directory
echo " --> Creating directory in studies for $study"
svn mkdir -q --parents -m "Created directory structure for $study" "$dest"
echo " --> Copying template study for $study"
svn copy -q -m "Added $study project" $src $dest/trunk
echo "Check out $study:"
echo "svn co $dest/trunk $study"
echo ""
echo "Remember to set the platform_id and trac_name in apps/frontend/config/app.yml!"
echo "- - - - - - - - - - - - - - - - - - - - - - - - - - - - "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment