From d0773cab8b2e329cce5019f8dfbda97530af660f Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 25 Sep 2017 08:58:39 +0200 Subject: neuesPerlPaket: nun noch interaktiver --- neuesPerlPaket | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'neuesPerlPaket') diff --git a/neuesPerlPaket b/neuesPerlPaket index 0b8b44cf2..d0313eee8 100755 --- a/neuesPerlPaket +++ b/neuesPerlPaket @@ -1,8 +1,15 @@ #!/bin/bash +if [ "x$1" = 'x-n' ]; then + update=false + shift +else + update=true +fi + if [ $# -ne 1 ] then - >&2 echo "Verwendung: neuesPerlPaket cpan-Name" + >&2 echo "Verwendung: neuesPerlPaket [-n] cpan-Name" exit 1 fi @@ -22,7 +29,7 @@ fi if [ -e "${pkgname}" ] then - >&2 echo "${cpanName} gibt es von ewe schon" + >&2 echo "${cpanName} gibt es von ewe schon (${pkgname})" exit 1 fi @@ -207,7 +214,13 @@ while ${needs_build}; do needs_build=true ;; 'n '*) - "${me}" "${antwort#* }" + for aw in ${antwort#* }; do + "${me}" -n "${aw}" + done + if [ "$(git -C "$(dirname "${me}")" symbolic-ref HEAD 2> /dev/null)" = 'refs/heads/master' ]; then + "$(dirname "${me}")/archPackagesUpdate" $(printf ' --only %s' ${antwort#* }) + sudo pacman -Sy + fi needs_build=true ;; *) @@ -233,7 +246,7 @@ fi git add PKGBUILD git commit -m "${pkgname} neu" -if [ "$(git -C "$(dirname "${me}")" symbolic-ref HEAD 2> /dev/null)" = 'refs/heads/master' ]; then +if ${update} && [ "$(git -C "$(dirname "${me}")" symbolic-ref HEAD 2> /dev/null)" = 'refs/heads/master' ]; then "$(dirname "${me}")/archPackagesUpdate" --only "${pkgname}" sudo pacman -Sy fi -- cgit v1.2.3-70-g09d2