summaryrefslogtreecommitdiff
path: root/src/update-from-egg.sh
diff options
context:
space:
mode:
authorjacob berkman <jacob@ximian.com>2002-07-15 14:18:51 +0000
committerJacob Berkman <jberkman@src.gnome.org>2002-07-15 14:18:51 +0000
commitdccd7a9b9994e1075a3c33ea278cfdb870fab675 (patch)
tree3353c8147db745952406748e37e802eaead88067 /src/update-from-egg.sh
parentbadb397bce9234d1acc99ca8f9072c0712b8d8a6 (diff)
downloadmetacity-dccd7a9b9994e1075a3c33ea278cfdb870fab675.tar.gz
metacity-dccd7a9b9994e1075a3c33ea278cfdb870fab675.tar.bz2
steal from profterm to fix build
2002-07-15 jacob berkman <jacob@ximian.com> * src/update-from-egg.sh: steal from profterm to fix build
Diffstat (limited to 'src/update-from-egg.sh')
-rwxr-xr-xsrc/update-from-egg.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/update-from-egg.sh b/src/update-from-egg.sh
new file mode 100755
index 0000000..9be68a9
--- /dev/null
+++ b/src/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