summaryrefslogtreecommitdiff
path: root/neuesPerlPaket
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-09-25 08:58:39 +0200
committerErich Eckner <git@eckner.net>2017-09-25 08:58:39 +0200
commitd0773cab8b2e329cce5019f8dfbda97530af660f (patch)
tree2675583aaa7e300a04411a22664d921d15f2ffca /neuesPerlPaket
parent3a557353dcfff593c0114791a3634a164ec23926 (diff)
downloadarchlinuxewe-d0773cab8b2e329cce5019f8dfbda97530af660f.tar.xz
neuesPerlPaket: nun noch interaktiver
Diffstat (limited to 'neuesPerlPaket')
-rwxr-xr-xneuesPerlPaket21
1 files changed, 17 insertions, 4 deletions
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