summaryrefslogtreecommitdiffstats
path: root/meta/bin/update
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2011-09-12 14:32:18 +0200
committermakefu <github@syntax-fehler.de>2011-09-12 14:32:18 +0200
commit9f70f9b5b462aa3e150b9708f695edfaf716edd4 (patch)
tree5cbebe6cbc0ada2c988d7f14d0bbbc52a68b37c1 /meta/bin/update
parent568fbd7fa5541182bbbc33560863ec9c3ff01d48 (diff)
parenta07326f6c57a7e8f49b9bef96ded427275a16e2e (diff)
Merge branch 'master' into punani_files
Diffstat (limited to 'meta/bin/update')
-rwxr-xr-xmeta/bin/update15
1 files changed, 15 insertions, 0 deletions
diff --git a/meta/bin/update b/meta/bin/update
new file mode 100755
index 00000000..9b2289ad
--- /dev/null
+++ b/meta/bin/update
@@ -0,0 +1,15 @@
+#! /bin/sh
+set -euf
+
+cd $(dirname $(readlink -f $0))/../..
+id=`ls -lnd . | awk '{print$3}'`
+
+if test "${nosudo-false}" != true -a `id -u` != $id; then
+ echo "we're going sudo..." >&2
+ exec sudo -u "#$id" "$0" "$@"
+ exit 23 # go to hell
+fi
+
+echo "// is $PWD owned by $id"
+
+git pull