Last active
May 15, 2016 17:43
-
-
Save arjunvenkat/a6feb4cbca9a540f8233f164cccd74ce to your computer and use it in GitHub Desktop.
Grading bash script for MBA courses
This file contains hidden or 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
# edit the project name and any feature specs if they're being copied in | |
project_name=photogram_golden_seven | |
mkdir ${project_name}_grades | |
cd $project_name | |
for branch in $(git for-each-ref --format='%(refname)' refs/remotes/); do | |
short_name=${branch/refs\/remotes\/origin\//""} | |
echo $short_name | |
git add -A | |
git stash | |
git checkout $short_name | |
cd .. | |
# rm $project_name/spec/features/zodiacs_feature_spec.rb | |
# cp zodiacs_feature_spec.rb $project_name/spec/features/zodiacs_feature_spec.rb | |
cd ${project_name}_grades | |
touch $short_name.json | |
cd ../$project_name | |
rspec --format j > ../${project_name}_grades/$short_name.json | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment