summaryrefslogtreecommitdiffstats
path: root/.graveyard/meta/bin
diff options
context:
space:
mode:
authorroot <root@pigstarter.de>2013-11-05 13:24:42 +0100
committerroot <root@pigstarter.de>2013-11-05 13:24:42 +0100
commit5e326f51c58e500285ea3daee91986ee1ea518eb (patch)
tree2b3eccf15e10e4331dcb2d01c9f53620d749f55f /.graveyard/meta/bin
parentae627d2aa73ea6862af3985f1c07e95c6d493275 (diff)
sandbox -> .graveyard
Diffstat (limited to '.graveyard/meta/bin')
-rwxr-xr-x.graveyard/meta/bin/update15
1 files changed, 15 insertions, 0 deletions
diff --git a/.graveyard/meta/bin/update b/.graveyard/meta/bin/update
new file mode 100755
index 00000000..9b2289ad
--- /dev/null
+++ b/.graveyard/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