summaryrefslogtreecommitdiff
path: root/pm
diff options
context:
space:
mode:
authorVictor Lowther <victor.lowther@gmail.com>2008-03-19 21:25:37 -0500
committerVictor Lowther <victor.lowther@gmail.com>2008-03-19 21:29:37 -0500
commita4f4526748482fd8c08a132d4dcb4762fc111041 (patch)
treea5d5d46c13664c30e12dfcb8544e0c5ce43bb467 /pm
parent0129bc69e33523c9746a44fb4a78e25579acecb8 (diff)
remove_parameters was not doing The Right Thing.
Rewrote parameter removal loop to try and fix that.
Diffstat (limited to 'pm')
-rw-r--r--pm/pm-functions.in19
1 files changed, 10 insertions, 9 deletions
diff --git a/pm/pm-functions.in b/pm/pm-functions.in
index a0895f5..7461087 100644
--- a/pm/pm-functions.in
+++ b/pm/pm-functions.in
@@ -82,16 +82,17 @@ load_hook_blacklist()
}
remove_parameters() {
- local x=""
- for p in $PM_CMDLINE; do
- [ "$1" = "$p" ] && {
- log "Removing parameter $1."
- continue
- }
- x="$x $p"
- [ "$2" ] && shift
+ local x y
+ for p in "$@"; do
+ for x in $PM_CMDLINE; do
+ [ "$x" = "$p" ] && {
+ log "Removing parameter $x."
+ continue
+ }
+ y="$y $x"
+ done
+ PM_CMDLINE="$y"
done
- PM_CMDLINE="$x"
}
add_parameters() {