summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChinaman <root@chinaman>2011-09-06 19:47:58 +0200
committerChinaman <root@chinaman>2011-09-06 19:47:58 +0200
commit108f3616e3f4958752d881192ef29e5fc4c2b045 (patch)
tree3c67478c852265219b72e6e1b05467d7065b7ba8 /lib
parentb2d65500160bcdf7abb2bf985f7da582b810e25c (diff)
parentc3bc5a6d16868c121aca780f3109155797b51d76 (diff)
Merge branch 'master' of github.com:krebscode/painload
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile9
-rw-r--r--lib/libkrebs.sh10
2 files changed, 19 insertions, 0 deletions
diff --git a/lib/Makefile b/lib/Makefile
new file mode 100644
index 00000000..4d33995f
--- /dev/null
+++ b/lib/Makefile
@@ -0,0 +1,9 @@
+
+
+.PHONY: all install
+all: select-target
+
+install: ../bin/libkrebs.sh
+
+../bin/libkrebs.sh: libkrebs.sh
+ ln -vsnf ../lib/$< $@
diff --git a/lib/libkrebs.sh b/lib/libkrebs.sh
new file mode 100644
index 00000000..d423a053
--- /dev/null
+++ b/lib/libkrebs.sh
@@ -0,0 +1,10 @@
+#! /bin/sh
+esudo() {
+ if test "${esudo-true}" = true -a `id -u` != 0; then
+ echo "we're going sudo..." >&2
+ export esudo=false
+ exec sudo "$0" "$@"
+ exit 23 # go to hell
+ fi
+}
+