diff options
author | Jonas Smedegaard <dr@jones.dk> | 2010-09-24 17:15:59 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2010-09-24 17:15:59 +0200 |
commit | d16c6107848b698b2b36866df621bf94848087a7 (patch) | |
tree | 6dcdb02c5ae3b588466124fd6f502cdc69bfcb58 /localkannel-dispatch | |
parent | e93fa21721642b1d0af3d98ba53e0cae0fbf0afb (diff) |
Fix parsing phones in go/so.
Diffstat (limited to 'localkannel-dispatch')
-rwxr-xr-x | localkannel-dispatch | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/localkannel-dispatch b/localkannel-dispatch index 00f7f5c..d034f53 100755 --- a/localkannel-dispatch +++ b/localkannel-dispatch @@ -240,7 +240,9 @@ and (if included) send MSG to subscribers." ;; esac # FIXME: Avoid hardcoding national prefix - while targetphone="$(echo "$1" | perl -pe 's/^(?=[^+])/+36/;' -e '/^\+\d+$/ or exit 1;')"; do + while [ -n "$1" ]; do + targetphone="$(echo "$1" | perl -pe 's/^(?=[^+])/+36/;' -e '/^\+\d+$/;')" + [ -n "$targetphone" ] || continue targetphones="${targetphones:+$targetphones }$targetphone" shift |