summaryrefslogtreecommitdiffstats
path: root/sandbox/meta/bin
diff options
context:
space:
mode:
authoreuer <root@euer.krebsco.de>2012-12-20 17:35:31 +0100
committereuer <root@euer.krebsco.de>2012-12-20 17:35:31 +0100
commit97bd0fe6fd64ba77e9bcf092f6f84301d2953bae (patch)
treece087d9fc993b5591e4cc13f1b627bb411d44dab /sandbox/meta/bin
parenta2f418e3b0ff8b452ca1893ab29d2cde75079189 (diff)
//meta -> //sandbox/meta
Diffstat (limited to 'sandbox/meta/bin')
-rwxr-xr-xsandbox/meta/bin/update15
1 files changed, 15 insertions, 0 deletions
diff --git a/sandbox/meta/bin/update b/sandbox/meta/bin/update
new file mode 100755
index 00000000..9b2289ad
--- /dev/null
+++ b/sandbox/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