From af58ce04faac0e73806e7a5ad9a2ad5262b459dd Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 6 Sep 2011 21:53:00 +0200 Subject: //meta/install: initial commit --- meta/install | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 meta/install (limited to 'meta/install') diff --git a/meta/install b/meta/install new file mode 100755 index 00000000..db4412fe --- /dev/null +++ b/meta/install @@ -0,0 +1,26 @@ +#! /bin/sh +set -euf + +cd $(dirname $(readlink -f $0)) + +id=`ls -lnd . | awk '{print$3}'` +update=$PWD/bin/update + +echo "#" +echo "# to install metastatic automatization facility do following:" +echo "#" +echo +echo " sudo ln -vsn $update /update" +echo +echo "#" + +if test -e /update; then + echo "# but beware: you already have an /update like this:" + ls -l /update +fi + +if test `id -u` != $id; then + echo "# and remember to allow yourself to sudo -u $id /update" +fi + +echo "#^D" -- cgit v1.2.3 From 3eacd8b8d5d0bde9ac4381ae1e92833aa10610a8 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 6 Sep 2011 21:55:22 +0200 Subject: //meta/install: fuck sudo --- meta/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta/install') diff --git a/meta/install b/meta/install index db4412fe..6bb04fec 100755 --- a/meta/install +++ b/meta/install @@ -10,7 +10,7 @@ echo "#" echo "# to install metastatic automatization facility do following:" echo "#" echo -echo " sudo ln -vsn $update /update" +echo " ln -vsn $update /update" echo echo "#" -- cgit v1.2.3 From dafd45a75f6c433485d2ec0fd4b9539b89e59175 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 6 Sep 2011 22:06:43 +0200 Subject: //meta/install: try to be more intelligent... untested^_^ --- meta/install | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'meta/install') diff --git a/meta/install b/meta/install index 6bb04fec..b74b7f02 100755 --- a/meta/install +++ b/meta/install @@ -3,7 +3,7 @@ set -euf cd $(dirname $(readlink -f $0)) -id=`ls -lnd . | awk '{print$3}'` +id=`ls -ld . | awk '{print$3}'` update=$PWD/bin/update echo "#" @@ -19,8 +19,9 @@ if test -e /update; then ls -l /update fi -if test `id -u` != $id; then +if test `id -un` != $id; then echo "# and remember to allow yourself to sudo -u $id /update" + echo "# i.e. add `id -un` ($id) NOPASSWD:/update" fi echo "#^D" -- cgit v1.2.3 From b2d997b47e52145c5119a6d71d00364ec231f3cc Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 6 Sep 2011 22:23:57 +0200 Subject: //meta/install: try do do it even better^_^ --- meta/install | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'meta/install') diff --git a/meta/install b/meta/install index b74b7f02..07096b34 100755 --- a/meta/install +++ b/meta/install @@ -12,16 +12,14 @@ echo "#" echo echo " ln -vsn $update /update" echo -echo "#" - if test -e /update; then echo "# but beware: you already have an /update like this:" ls -l /update fi - -if test `id -un` != $id; then - echo "# and remember to allow yourself to sudo -u $id /update" - echo "# i.e. add `id -un` ($id) NOPASSWD:/update" -fi - +echo "# then check if you can execute following with your current user:" +echo +echo " /update" +echo +echo "# if not then add that user to your sudoers... maybe something" +echo "# like this could work: `id -un` ALL=($id) NOPASSWD:/update" echo "#^D" -- cgit v1.2.3