#!/bin/bash
-# a simple script for updating a set of folders on a usb stick from subversion or git. currently
+# a simple script for updating a set of folders on a usb stick from subversion or git.
+# currently
# just runs with no parameters and expects to get all archives from wherever the files originally
# came from.
+
+dir="$1"; shift
+if [ -z "$dir" ]; then
+ dir=.
+fi
+
+pushd "$dir"
+
for i in * ; do
if [ -d "$i" ]; then
pushd $i
if [ -d ".svn" ]; then
svn update .
elif [ -d ".git" ]; then
- git pull .
+ git pull
+ elif [ -d "CVS" ]; then
+ cvs update .
fi
popd
fi
done
+
+popd
+
+