summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorJonathan Frazier <eyeswide@gmail.com>2013-07-15 12:56:03 -0400
committerAllan McRae <allan@archlinux.org>2013-07-30 13:00:10 +1000
commit05e954d2cd71bf1031a79bd77610c6cb1da9ef54 (patch)
tree201c3ebd2b0d03a683385cec8e3f47e8d6e1afee /contrib
parentbcde02709120fa8d16d63d5fc797876f5f2fc465 (diff)
downloadpacman-05e954d2cd71bf1031a79bd77610c6cb1da9ef54.tar.xz
pacdiff: allow multiple separated options
loop over arguments, this will allow adding options such as --nocolor Signed-off-by: Jonathan Frazier <eyeswide@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/pacdiff.sh.in7
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/pacdiff.sh.in b/contrib/pacdiff.sh.in
index eda3878d..ce7de529 100644
--- a/contrib/pacdiff.sh.in
+++ b/contrib/pacdiff.sh.in
@@ -64,8 +64,8 @@ cmd() {
fi
}
-if [ $# -gt 0 ]; then
- case $1 in
+while [[ -n "$1" ]]; do
+ case "$1" in
-l|--locate)
locate=1;;
-V|--version)
@@ -75,7 +75,8 @@ if [ $# -gt 0 ]; then
*)
usage; exit 1;;
esac
-fi
+ shift
+done
# see http://mywiki.wooledge.org/BashFAQ/020
while IFS= read -u 3 -r -d '' pacfile; do