From d16c6107848b698b2b36866df621bf94848087a7 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Fri, 24 Sep 2010 17:15:59 +0200 Subject: Fix parsing phones in go/so. --- localkannel-dispatch | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'localkannel-dispatch') 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 -- cgit v1.2.3