summarylogtreecommitdiffstats
path: root/fakeAUR.sh
diff options
context:
space:
mode:
Diffstat (limited to 'fakeAUR.sh')
-rwxr-xr-xfakeAUR.sh11
1 files changed, 5 insertions, 6 deletions
diff --git a/fakeAUR.sh b/fakeAUR.sh
index d2798601ae4a..ef972a1cf188 100755
--- a/fakeAUR.sh
+++ b/fakeAUR.sh
@@ -21,6 +21,7 @@ then
exit 1
fi
+first=1
for i in "$@"
do
case $i in
@@ -93,11 +94,7 @@ for i in "$@"
echo $description
;;
*)
- preventdouble="true"
- ;;
- esac
-
- if [[ $preventdouble = "true" ]]; then
+ 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)
@@ -108,6 +105,8 @@ 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/"
- fi
+ fi
+ ;;
+ esac
done
exit 0