diff options
author | krebs <krebs@fuerkrebs> | 2011-09-24 16:31:28 -0400 |
---|---|---|
committer | krebs <krebs@fuerkrebs> | 2011-09-24 16:31:28 -0400 |
commit | f3409fb38be4cf0c84f6c2075cb67844cc58c93a (patch) | |
tree | 82e7001a09557d9525d3c2fa9f4a01b2e1c187c7 | |
parent | 765ba540f3fd22216691122064b1426784f8de31 (diff) |
//punani: fix debian functions
punani uses apt-file now correctly, command is apt-file search -l -x /FILE$
this will find ONLY the file with the full given name
-rwxr-xr-x | punani/bin/punani | 22 |
1 files changed, 14 insertions, 8 deletions
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 |