From c4f80b7498e74352f6e79647ab4a82314f3418a7 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 30 Dec 2013 17:32:26 +0100 Subject: add todo for punani --- ship/TODO | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 ship/TODO (limited to 'ship') diff --git a/ship/TODO b/ship/TODO new file mode 100644 index 00000000..b929ca02 --- /dev/null +++ b/ship/TODO @@ -0,0 +1,5 @@ +# punani + +- error code should be false when package cannot be removed because it is not + installed +- error code should be false when checking if a package is installed -- cgit v1.2.3 From 2d7276a789a9ce2062c351afd27e33021c1ce5b1 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 30 Dec 2013 17:36:55 +0100 Subject: ship/punani: fix TODOs regarding return values --- ship/TODO | 4 +--- ship/lib/punani | 5 +++-- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'ship') diff --git a/ship/TODO b/ship/TODO index b929ca02..bc522b79 100644 --- a/ship/TODO +++ b/ship/TODO @@ -1,5 +1,3 @@ # punani -- error code should be false when package cannot be removed because it is not - installed -- error code should be false when checking if a package is installed +- pacman cannot automagically remove packages diff --git a/ship/lib/punani b/ship/lib/punani index ea05a4ec..512c732c 100644 --- a/ship/lib/punani +++ b/ship/lib/punani @@ -70,14 +70,14 @@ punani(){ if punani_has $RES; then info "$RES already installed, skipping" else - punani_install $RES || error "cannot install $RES with $PACKER" + punani_install $RES || die "cannot install $RES with $PACKER" fi ;; remove) if ! punani_has $RES; then info "$RES not installed, skipping" else - punani_remove $RES || error "cannot install $RES with $PACKER" + punani_remove $RES || die "cannot install $RES with $PACKER" fi ;; has) @@ -85,6 +85,7 @@ punani(){ info "$RES is installed" else info "$RES is not installed" + exit 1 fi ;; owner) -- cgit v1.2.3 From efef353ef2bf65ef6123fc699bce6c69fc37cfcc Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 30 Dec 2013 17:37:55 +0100 Subject: fix punani bug regarding pacman package removal --- ship/TODO | 3 --- ship/lib/punani | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'ship') diff --git a/ship/TODO b/ship/TODO index bc522b79..e69de29b 100644 --- a/ship/TODO +++ b/ship/TODO @@ -1,3 +0,0 @@ -# punani - -- pacman cannot automagically remove packages diff --git a/ship/lib/punani b/ship/lib/punani index 512c732c..4338d19d 100644 --- a/ship/lib/punani +++ b/ship/lib/punani @@ -34,7 +34,7 @@ _punani_select_packer() { } _punani_known_packers='pacman apt-get yum brew' _punani_pacman_install(){ pacman --noconfirm -S --needed "$@" ;} -_punani_pacman_remove(){ pacman -Rcs "$@" ;} +_punani_pacman_remove(){ pacman --noconfirm -Rcs "$@" ;} _punani_pacman_has(){ pacman -Q "$1" >/dev/null;} _punani_pacman_owner() { pacman -Qo "$1"; } _punani_aptget_install(){ apt-get -y install "$@" ;} -- cgit v1.2.3