public
Last active

Zips diff files for GSoC code submission

  • Download Gist
bzr-gsoc-zipper.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
#!/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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.