example startup script, updated conf.
[feisty_meow.git] / scripts / rev_control / update_these.sh
1 #!/bin/bash
2 # a simple script for updating a set of folders on a usb stick from subversion or git.
3 #  currently
4 # just runs with no parameters and expects to get all archives from wherever the files originally
5 # came from.
6
7 dir="$1"; shift
8 if [ -z "$dir" ]; then
9   dir=.
10 fi
11
12 pushd "$dir" &>/dev/null
13
14 for i in * ; do
15   if [ -d "$i" ]; then
16     echo "[$i]"
17     pushd $i &>/dev/null
18     # only update if we see a repository living there.
19     if [ -d ".svn" ]; then
20       svn update .
21     elif [ -d ".git" ]; then
22       git pull 
23     elif [ -d "CVS" ]; then
24       cvs update .
25     fi
26     popd &>/dev/null
27     echo "======="
28   fi
29 done
30
31 popd &>/dev/null
32
33