projects
/
feisty_meow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
aha, that's where it was ignoring spaces. i actually don't want to lose lines
[feisty_meow.git]
/
scripts
/
rev_control
/
update_these.sh
diff --git
a/scripts/rev_control/update_these.sh
b/scripts/rev_control/update_these.sh
index afd79578dce3b235ce7daa3af3cd5c8bfd653faf..b0cc4b8aad25980d7b2febca1a12cc79fa7eac93 100644
(file)
--- a/
scripts/rev_control/update_these.sh
+++ b/
scripts/rev_control/update_these.sh
@@
-1,16
+1,33
@@
#!/bin/bash
#!/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.
# 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" &>/dev/null
+
for i in * ; do
if [ -d "$i" ]; then
for i in * ; do
if [ -d "$i" ]; then
- pushd $i
+ echo "[$i]"
+ pushd $i &>/dev/null
# only update if we see a repository living there.
if [ -d ".svn" ]; then
svn update .
elif [ -d ".git" ]; then
# only update if we see a repository living there.
if [ -d ".svn" ]; then
svn update .
elif [ -d ".git" ]; then
- git pull .
+ git pull
+ elif [ -d "CVS" ]; then
+ cvs update .
fi
fi
- popd
+ popd &>/dev/null
+ echo "======="
fi
done
fi
done
+
+popd &>/dev/null
+
+