diff options
author | schrmh | 2018-09-18 07:09:06 +0200 |
---|---|---|
committer | schrmh | 2018-09-18 07:09:06 +0200 |
commit | 186abe359f6206a2714ce6a6d4ba122bf71548c1 (patch) | |
tree | babb74759d4f75301969a64b0bc244b7ad89637c | |
parent | ec7fbaee05b900e6f41ecdf27d5841bf1bd7f336 (diff) | |
download | aur-186abe359f6206a2714ce6a6d4ba122bf71548c1.tar.gz |
* case now only sets a variable to prevent double execution (I hope)
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 2 | ||||
-rwxr-xr-x | fakeAUR.sh | 8 |
3 files changed, 8 insertions, 4 deletions
@@ -1,6 +1,6 @@ pkgbase = fakeaur pkgdesc = Edit names and descriptions of AUR packages. Meme mates with nani or btwiusearch - pkgver = r8.3254db9 + pkgver = r9.c1c167c pkgrel = 2 url = https://github.com/schrmh/fakeAUR arch = any @@ -1,6 +1,6 @@ # Maintainer: Hans Müller <schreibemirhalt@gmail.com> pkgname=fakeaur -pkgver=r8.3254db9 +pkgver=r9.c1c167c pkgrel=2 pkgdesc="Edit names and descriptions of AUR packages. Meme mates with nani or btwiusearch" arch=('any') diff --git a/fakeAUR.sh b/fakeAUR.sh index 823db204df06..d2798601ae4a 100755 --- a/fakeAUR.sh +++ b/fakeAUR.sh @@ -93,6 +93,11 @@ for i in "$@" echo $description ;; *) + preventdouble="true" + ;; + esac + + if [[ $preventdouble = "true" ]]; then processes=$(> >(ps -f)) pac=$(echo $processes | grep -o -P "(?<=00:00:00).*(?=$USER)" | grep -o -P "(?<=00:00:00).*(?=00:00:00)") helper=$(echo $pac | cut -d' ' -f1) @@ -103,7 +108,6 @@ for i in "$@" name=$(echo ${pac} | grep -Eo "[^ ]+$") echo ${PS1@P}$helper $1 echo -ne '\n' | eval ${pac} | sed -e "s/$name/$1/" | sed -e "s/$description/$2/" - ;; - esac + fi done exit 0 |