diff options
author | makefu <github@syntax-fehler.de> | 2011-09-12 14:32:18 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2011-09-12 14:32:18 +0200 |
commit | 9f70f9b5b462aa3e150b9708f695edfaf716edd4 (patch) | |
tree | 5cbebe6cbc0ada2c988d7f14d0bbbc52a68b37c1 /meta | |
parent | 568fbd7fa5541182bbbc33560863ec9c3ff01d48 (diff) | |
parent | a07326f6c57a7e8f49b9bef96ded427275a16e2e (diff) |
Merge branch 'master' into punani_files
Diffstat (limited to 'meta')
-rwxr-xr-x | meta/bin/update | 15 | ||||
-rwxr-xr-x | meta/install | 25 |
2 files changed, 40 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 diff --git a/meta/install b/meta/install new file mode 100755 index 00000000..07096b34 --- /dev/null +++ b/meta/install @@ -0,0 +1,25 @@ +#! /bin/sh +set -euf + +cd $(dirname $(readlink -f $0)) + +id=`ls -ld . | awk '{print$3}'` +update=$PWD/bin/update + +echo "#" +echo "# to install metastatic automatization facility do following:" +echo "#" +echo +echo " [32mln -vsn $update /update[m" +echo +if test -e /update; then + echo "# but beware: you already have an /update like this:" + ls -l /update +fi +echo "# then check if you can execute following with your current user:" +echo +echo " [32m/update[m" +echo +echo "# if not then add that user to your sudoers... maybe something" +echo "# like this could work: [32m`id -un` ALL=($id) NOPASSWD:/update[m" +echo "#[35m^D[m" |