From 97bd0fe6fd64ba77e9bcf092f6f84301d2953bae Mon Sep 17 00:00:00 2001 From: euer Date: Thu, 20 Dec 2012 17:35:31 +0100 Subject: //meta -> //sandbox/meta --- sandbox/meta/bin/update | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 sandbox/meta/bin/update (limited to 'sandbox/meta/bin/update') 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 -- cgit v1.2.3