From 8575b9856aca6809bce214fd8a199c990cb6561c Mon Sep 17 00:00:00 2001 From: EUcancER Date: Wed, 16 Nov 2011 22:27:12 +0100 Subject: //punani: tightnani_client -> tinani, add packages --- punani/tightnani/tightnani_client | 59 --------------------------------------- punani/tightnani/tightnani_db | 26 ++++++++++++++++- punani/tightnani/tinani | 59 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 60 deletions(-) delete mode 100755 punani/tightnani/tightnani_client create mode 100755 punani/tightnani/tinani diff --git a/punani/tightnani/tightnani_client b/punani/tightnani/tightnani_client deleted file mode 100755 index 8caf669e..00000000 --- a/punani/tightnani/tightnani_client +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash -set -euf - -if [ $# -ne 2 ];then - echo "usage: `basename $0` (install|remove) PACKAGE" - exit 23 -fi - -PACKERS="yum!-y install remove -brew install remove -pacman!--noconfirm -S!--needed -Rcs -bauerbill!--noconfirm -S!--needed -Rcs -yaourt!--noconfirm -S!--needed -Rcs -packer!--noconfirm -S!--needed -Rcs -apt-get!--yes install remove -aptitude!--yes install remove" - -OIFS=$IFS -PACKER= -IFS=' -' - -TIGHTNANI_HOST="http://euer.krebsco.de:9111" -# Find suitable packer -for PACKER_LINE in $PACKERS; do - TRY_PACKER_CMD="$(echo "$PACKER_LINE" | cut -d ' ' -f 1)" - TRY_PACKER="$(echo "$TRY_PACKER_CMD" | cut -d '!' -f 1)" - if which $TRY_PACKER &>/dev/null; then - PACKER=$TRY_PACKER - PACKER_CMD="$(echo "$TRY_PACKER_CMD" | tr "!" " ")" - echo "you got $PACKER" - INSTALL_PARAM="$(echo "$PACKER_LINE" | cut -d ' ' -f 2 | tr "!" " ")" - REMOVE_PARAM="$(echo "$PACKER_LINE" | cut -d ' ' -f 3 | tr "!" " ")" - fi -done -IFS=$OIFS -if [ ! "$PACKER" ];then - echo "Could not find a supported packer for you, bailing out!" - exit 23 -fi - - -# find the package name -PKG="$2" -RESOLVED=`wget -O- $TIGHTNANI_HOST/$PACKER/$PKG 2>/dev/null` -if [ ! "$RESOLVED" ];then - echo "Could not resolve your requested package, bailing out!" - exit 23 -fi -case "$1" in - install) - exec $PACKER_CMD $INSTALL_PARAM $RESOLVED - ;; - remove) - exec $PACKER_CMD $REMOVE_PARAM $RESOLVED - ;; - *) - echo "usage: `basename $0` (install|remove) PACKAGE" -esac diff --git a/punani/tightnani/tightnani_db b/punani/tightnani/tightnani_db index 6ae8098c..3641350d 100644 --- a/punani/tightnani/tightnani_db +++ b/punani/tightnani/tightnani_db @@ -28,5 +28,29 @@ "tinc" : { "apt-get" : "tinc", "yaourt" : "tinc" - } + }, + "python-notify" : { + "pacman" : "python-notify", + "apt-get" : "python-notify" + }, + "python-dbus" : { + "pacman" : "dbus-python", + "apt-get" : "python-dbus" + }, + "w3m" : { + "pacman" : "w3m", + "apt-get" : "w3m" + }, + "make" : { + "pacman" : "make", + "apt-get" : "make" + }, + "perl-xml-simple" : { + "apt-get" : "libxml-simple-perl", + "pacman" : "perl-xml-simple" + }, + "hostname" : { + "pacman" : "inetutils", + "apt-get" : "hostname" + } } diff --git a/punani/tightnani/tinani b/punani/tightnani/tinani new file mode 100755 index 00000000..8caf669e --- /dev/null +++ b/punani/tightnani/tinani @@ -0,0 +1,59 @@ +#!/bin/bash +set -euf + +if [ $# -ne 2 ];then + echo "usage: `basename $0` (install|remove) PACKAGE" + exit 23 +fi + +PACKERS="yum!-y install remove +brew install remove +pacman!--noconfirm -S!--needed -Rcs +bauerbill!--noconfirm -S!--needed -Rcs +yaourt!--noconfirm -S!--needed -Rcs +packer!--noconfirm -S!--needed -Rcs +apt-get!--yes install remove +aptitude!--yes install remove" + +OIFS=$IFS +PACKER= +IFS=' +' + +TIGHTNANI_HOST="http://euer.krebsco.de:9111" +# Find suitable packer +for PACKER_LINE in $PACKERS; do + TRY_PACKER_CMD="$(echo "$PACKER_LINE" | cut -d ' ' -f 1)" + TRY_PACKER="$(echo "$TRY_PACKER_CMD" | cut -d '!' -f 1)" + if which $TRY_PACKER &>/dev/null; then + PACKER=$TRY_PACKER + PACKER_CMD="$(echo "$TRY_PACKER_CMD" | tr "!" " ")" + echo "you got $PACKER" + INSTALL_PARAM="$(echo "$PACKER_LINE" | cut -d ' ' -f 2 | tr "!" " ")" + REMOVE_PARAM="$(echo "$PACKER_LINE" | cut -d ' ' -f 3 | tr "!" " ")" + fi +done +IFS=$OIFS +if [ ! "$PACKER" ];then + echo "Could not find a supported packer for you, bailing out!" + exit 23 +fi + + +# find the package name +PKG="$2" +RESOLVED=`wget -O- $TIGHTNANI_HOST/$PACKER/$PKG 2>/dev/null` +if [ ! "$RESOLVED" ];then + echo "Could not resolve your requested package, bailing out!" + exit 23 +fi +case "$1" in + install) + exec $PACKER_CMD $INSTALL_PARAM $RESOLVED + ;; + remove) + exec $PACKER_CMD $REMOVE_PARAM $RESOLVED + ;; + *) + echo "usage: `basename $0` (install|remove) PACKAGE" +esac -- cgit v1.2.3