summaryrefslogtreecommitdiff
path: root/update-from-gsd.sh
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2012-04-19 11:50:58 +0100
committerBastien Nocera <hadess@hadess.net>2012-04-19 12:01:14 +0100
commit69b5afd9fed2c8f6b24e9c9706307df836d7a009 (patch)
tree03f6937bbb559777ecd90374f95625f42ff49f3b /update-from-gsd.sh
parenteeed45ff81e6ae9be0f4b0a51136da200afc3156 (diff)
downloadgnome-control-center-69b5afd9fed2c8f6b24e9c9706307df836d7a009.tar.gz
wacom: Move update-from-gsd.sh to root
Diffstat (limited to 'update-from-gsd.sh')
-rwxr-xr-xupdate-from-gsd.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/update-from-gsd.sh b/update-from-gsd.sh
new file mode 100755
index 000000000..6eccb4cc6
--- /dev/null
+++ b/update-from-gsd.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+function die() {
+ echo $*
+ exit 1
+}
+
+if test -z "$DIR"; then
+ echo "Must set DIR"
+ exit 1
+fi
+
+if test -z "$FILES"; then
+ echo "Must set FILES"
+ exit 1
+fi
+
+for FILE in $FILES; do
+ if cmp -s $DIR/$FILE $FILE; then
+ echo "File $FILE is unchanged"
+ else
+ cp $DIR/$FILE $FILE || die "Could not move $DIR/$FILE to $FILE"
+ echo "Updated $FILE"
+ git add $FILE
+ fi
+done