Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/cut-n-paste/recent-files/update-from-egg.sh
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@src.gnome.org>2004-12-21 17:41:03 (GMT)
committer Marco Pesenti Gritti <marco@src.gnome.org>2004-12-21 17:41:03 (GMT)
commit69d92c409d333e5dd9cc82537c0834b201487c60 (patch)
treee982b034261d7c3c24992497e0a885e3d719ec0a /cut-n-paste/recent-files/update-from-egg.sh
parent4c2778e5714bbd5ae60e74133d1482acf162e719 (diff)
Initial revision
Diffstat (limited to 'cut-n-paste/recent-files/update-from-egg.sh')
-rwxr-xr-xcut-n-paste/recent-files/update-from-egg.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/cut-n-paste/recent-files/update-from-egg.sh b/cut-n-paste/recent-files/update-from-egg.sh
new file mode 100755
index 0000000..9be68a9
--- /dev/null
+++ b/cut-n-paste/recent-files/update-from-egg.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+function die() {
+ echo $*
+ exit 1
+}
+
+if test -z "$EGGDIR"; then
+ echo "Must set EGGDIR"
+ exit 1
+fi
+
+if test -z "$EGGFILES"; then
+ echo "Must set EGGFILES"
+ exit 1
+fi
+
+for FILE in $EGGFILES; do
+ if cmp -s $EGGDIR/$FILE $FILE; then
+ echo "File $FILE is unchanged"
+ else
+ cp $EGGDIR/$FILE $FILE || die "Could not move $EGGDIR/$FILE to $FILE"
+ echo "Updated $FILE"
+ fi
+done