54b26e8a10b0003a025c2889e4234515b45b07e6
[feisty_meow.git] / scripts / rev_control / checkin.sh
1 #!/bin/bash
2
3 # checks in all our commonly used folders.
4 # note: fred specific.
5
6 source "$SHELLDIR/rev_control/rev_control.sh"
7
8 # selects the method for check-in based on where we are.
9 function do_checkin()
10 {
11   local directory="$1"; shift
12   if [ -d "CVS" ]; then
13     # this appears to be cvs.
14     pushd "$directory/.." &>/dev/null
15     cvs ci "$directory"
16     popd &>/dev/null
17   elif [ -d ".svn" ]; then
18     svn ci .
19   elif [ -d ".git" ]; then
20     git commit .
21     git push
22   else
23     echo unknown repository for $directory...
24   fi
25 }
26
27 function checkin_list {
28   local list=$*
29   for i in $list; do
30     for j in $i/feisty_meow $i/hoople $i/hoople2 $i/quartz $i/web $i/yeti $i/xsede/xsede_tests $i/xsede/code/cak0l/trunk ; do
31       if [ ! -d "$j" ]; then continue; fi
32
33       pushd $j &>/dev/null
34       echo "checking in '$j'..."
35       do_checkin $j
36       popd &>/dev/null
37     done
38   done
39 }
40
41 if [ "$OS" != "Windows_NT" ]; then
42   # first get individual folders.
43   checkin_list $HOME
44 else
45   checkin_list c: c:/home d: d:/home e: e:/home f: f:/home g: g:/home h: h:/home i: i:/home 
46 fi
47