18b459a01285316e3f49efd759e4803087d11d05
[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 "$FEISTY_MEOW_SCRIPTS/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 .
16 ###"$directory"
17 #    popd &>/dev/null
18   elif [ -d ".svn" ]; then
19     svn ci .
20   elif [ -d ".git" ]; then
21     git commit .
22     git push
23   else
24     echo unknown repository for $directory...
25   fi
26 }
27
28 function checkin_list {
29   local list=$*
30   for i in $list; do
31     for j in $i/feisty_meow $i/hoople1 $i/hoople2 $i/quartz $i/web $i/yeti $i/xsede/xsede_tests $i/xsede/code/cak0l/trunk ; do
32       if [ ! -d "$j" ]; then continue; fi
33
34       pushd $j &>/dev/null
35       echo "checking in '$j'..."
36       do_checkin $j
37       popd &>/dev/null
38     done
39   done
40 }
41
42 if [ "$OS" != "Windows_NT" ]; then
43   # first get individual folders.
44   checkin_list $HOME
45 else
46   checkin_list c: c:/home d: d:/home e: e:/home f: f:/home g: g:/home h: h:/home i: i:/home 
47 fi
48