summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@iiso>2011-09-24 22:37:40 +0200
committertv <tv@iiso>2011-09-24 22:37:40 +0200
commitba96a0a78c46bdaedc1c3ffcda0cc5c8525dd967 (patch)
tree5176d5e770f9dde3696bb225d0a238adce88917e
parentf87e292ecb4d2be09b17d4c68d7c40031e924489 (diff)
parent04e5f9847f8afd771ccc2410e2fb5e616aa1a4e9 (diff)
Merge branch 'master' of github.com:krebscode/painload
-rw-r--r--punani/Makefile5
-rwxr-xr-xpunani/bin/punani22
2 files changed, 19 insertions, 8 deletions
diff --git a/punani/Makefile b/punani/Makefile
new file mode 100644
index 00000000..26057d00
--- /dev/null
+++ b/punani/Makefile
@@ -0,0 +1,5 @@
+
+install: ../bin/punani
+
+../bin/punani:
+ ln -snvf ../punani/bin/punani ../bin/punani
diff --git a/punani/bin/punani b/punani/bin/punani
index cec53ca1..34d5bcbf 100755
--- a/punani/bin/punani
+++ b/punani/bin/punani
@@ -111,23 +111,29 @@ handle_system () {
}
;;
(*debian-like*)
- if [ "${dryrun-}" ]; then
- apt-file () { echo $@; }
- apt-get () { echo $@; }
+ #if [ "${dryrun-}" ]; then
+ # apt-file () { echo $@; }
+ # apt-get () { echo $@; }
+ #fi
+ if [ `which apt-file` ]; then
+ echo "installing dependencies: apt-file"
+ apt-get install --yes apt-file
+ echo "update the apt-file tool"
+ apt-file update
fi
- [ `which apt-file` ] || apt-get install --yes apt-file && apt-file update
punani_Scientist_update() {
apt-get update
apt-file update
}
+
punani_Scientist_search() {
- apt-file search $1 && exit 0
+ apt-file search -l -x /$1\$ && exit 0
if [ "${hard-}" ] ; then
apt-cache search $1
fi
}
punani_Engineer_insert() {
- if apt-get install `apt-file search $1`;then
+ if apt-get install `apt-file search -l -x /$1\$`;then
echo "++ finished"
else
if [ "${hard-}" ] ; then
@@ -137,7 +143,7 @@ handle_system () {
fi
}
punani_Engineer_remove() {
- apt-get remove --purge "`apt-file search $1`"
+ apt-get remove --purge "`apt-file search -l -x /$1\$`"
if [ "${hard-}" ] ; then
echo "** trying harder"
echo "** directly delete given package name"
@@ -149,7 +155,7 @@ handle_system () {
email='krebs@syntax-fehler.de'
irc_host='irc.freenode.org'
irc_channel='#tincspasm'
- cat>&2<<EOF
+ cat >&2 <<EOF
Error 2: Your System Will Be Supported ASAP
1. send us a bug report
1.1 your operating system's name and version