26058d78845f3fc78b3f0c38f1a8cf9cb6abf369
[modest] / scripts / update-garage
1 #!/bin/sh
2 # -*-mode:sh-*-
3 # Time-stamp: <2007-05-19 13:03:07 (djcb)>
4 #
5 # script to sync the external garage repository with what is inside 
6 # projects.maemo, without the stuff that is only useful inside
7 # projects.maemo.
8 #
9
10 LOCAL_GARAGE_DIR="$HOME/src/modest-garage"
11
12 echo "+ checking $LOCAL_GARAGE_DIR"
13 if [ -d $LOCAL_GARAGE_DIR ]; then
14    echo "$LOCAL_GARAGE_DIR already exists"
15    exit 1
16 fi
17
18 mkdir $LOCAL_GARAGE_DIR || {
19     echo "- failed to create $LOCAL_GARAGE_DIR"
20     exit 1
21 }
22
23 echo "+ checking out garage version"
24 cd $LOCAL_GARAGE_DIR
25 svn co https://garage.maemo.org/svn/modest/modest/trunk modest
26
27 echo "+ dumping the internal version on top"
28 svn export --force  https://projects.maemo.org/svn/email/modest-email/modest/trunk modest
29
30 cd modest
31
32 echo "+ removing internal stuff"
33 rm -rf scripts
34 rm debian/changelog
35
36 echo "+ get the external debian/changelog"
37 svn up debian/changelog
38
39 echo "+ adding anything not yet in the garage repo"
40 #FIXME: what about files that have been removed locally?
41 svn add `find -type f | grep -v '.svn'` 2> /dev/null
42
43 echo "+ showing the differences"
44 svn diff | diffstat
45
46 echo "+ now, go to $LOCAL_GARAGE_DIR/modest, edit debian/changelog, run 'svn commit' and write a nice commit message"