Created
August 29, 2011 21:25
-
-
Save idlecool/1179450 to your computer and use it in GitHub Desktop.
Zips diff files for GSoC code submission
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 | |
# Author: Shiv Deepak <idlecool@gmail.com> | |
# Bazaar GSoC Zipper | |
# I basically wrote this script to generate diff files for my project | |
# from parent banch (which is `vita` for me ), for most of you it will | |
# be `trunk`, just get a fresh copy of trunk and run this script inside it. | |
# Ex: | |
# | |
# Step 1: Get a fresh copy of trunk | |
# $ bzr branch lp:sahana-eden eden | |
# $ cd eden | |
# | |
# Step 2: Move this script into the trunk | |
# $ mv ~/Downloads/bzr-gsoc-zipper.sh . | |
# | |
# Step 3: Just modify variables `revisions`, `branch`, `student_name` | |
# $ emacs bzr-gsoc-zipper.sh | |
# | |
# Step 4: execute the script | |
# $ bash bzr-gsoc-zipper.sh | |
# | |
# Step 5: Save the tarball and cleanup | |
# $ cp Given_Name_Surname.tar.gz ~/ | |
# $ rm bzr-gsoc-zipper.sh* | |
# | |
# > Enter Your Revisions | |
revisions=( 1583 1663 1664 1665 1716 1718 1746 1773 1824 1840 ) | |
# > Enter Branch Name | |
branch="trunk" | |
# > Enter Student Name from melange profile | |
student_name="Given_Name_Surname" | |
dirname=$student_name | |
mkdir $dirname | |
for each_revision in ${revisions[@]} | |
do | |
previous_revision=$(($each_revision-1)) | |
bzr diff -r$previous_revision..$each_revision > $dirname/$branch-r$each_revision.txt | |
done | |
tar -pczf $student_name.tar.gz $dirname | |
rm -rf $dirname |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment