diff options
author | schrmh | 2018-09-18 07:25:52 +0200 |
---|---|---|
committer | schrmh | 2018-09-18 07:25:52 +0200 |
commit | cfcecc5b6868c2d8eb419acdbc666e1cefac18c4 (patch) | |
tree | 7c504a491ebebd80e442694d9430fc7eb4e5ec64 | |
parent | acd2d662eefaa4eeb50512210e475448467e99e7 (diff) | |
download | aur-cfcecc5b6868c2d8eb419acdbc666e1cefac18c4.tar.gz |
double output fix!
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 2 | ||||
-rwxr-xr-x | fakeAUR.sh | 27 |
3 files changed, 16 insertions, 15 deletions
@@ -1,6 +1,6 @@ pkgbase = fakeaur pkgdesc = Edit names and descriptions of AUR packages. Meme mates with nani or btwiusearch - pkgver = r10.16df655 + pkgver = r11.37adea1 pkgrel = 2 url = https://github.com/schrmh/fakeAUR arch = any @@ -1,6 +1,6 @@ # Maintainer: Hans Müller <schreibemirhalt@gmail.com> pkgname=fakeaur -pkgver=r10.16df655 +pkgver=r11.37adea1 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 ef972a1cf188..926799b52f9a 100755 --- a/fakeAUR.sh +++ b/fakeAUR.sh @@ -21,7 +21,7 @@ then exit 1 fi -first=1 +first="enabled" for i in "$@" do case $i in @@ -94,18 +94,19 @@ for i in "$@" echo $description ;; *) - if [ "$first" ] 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) - two=$(echo $pac | cut -d' ' -f2) - pac=$helper" "$two - - description=$(echo -ne '\n' | eval "${pac}" | grep " ") - 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/" - fi + if [[ $first = "enabled" ]]; then + first="disabled" + 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) + two=$(echo $pac | cut -d' ' -f2) + pac=$helper" "$two + + description=$(echo -ne '\n' | eval "${pac}" | grep " ") + 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/" + fi ;; esac done |