Documented contrib/debian/update.sh
[conkeror/arlinius.git] / contrib / debian / update.sh
blob758fd03df6342d7dc886713fb37bb9c08156b93e
1 #!/bin/sh
2 # Script to prepare Debian packages of conkeror including the creation
3 # of the so called source package.
5 # Copyright (C) 2008-2009 Axel Beckert <abe@deuxchevaux.org>
7 # Find the full path of the current packaging directory and cd to it
8 currdir=`dirname $0`/..
9 cd $currdir
10 olddir=$(basename $(pwd -P))
11 echo currdir=$currdir olddir=$olddir
13 # Unapply all patches if there are any
14 quilt pop -a
16 # Update the code from the git repository
17 git fetch
19 # Display the changes and ask if we should continue
20 git log HEAD..origin
21 echo -n "Hit enter to continue and merge changes or hit Ctrl-C to abort."
22 read line
24 # Merge in the fetched changes
25 git rebase origin/master
27 # Rename the packaging directory to reflect the new version number
28 version=0.9~git`date +%y%m%d`
29 echo -n "Hit enter to rename directory from $olddir to conkeror-$version
30 and generate source tar ball or hit Ctrl-C to abort."
31 read line
33 # Clean up before renaming
34 rm -f spawn-process-helper conkeror-spawn-helper
35 make clean
37 # Do the rename
38 cd ..
39 mv -vi $olddir conkeror-$version
41 # Create source package out of the git working copy
42 tar cvzf conkeror_$version.orig.tar.gz --exclude=debian --exclude=.git --exclude=.pc --exclude=configure-stamp conkeror-$version
44 # Change back to the packaging directory
45 cd conkeror-$version