[Webapps-common-discuss] webapps-common/internal common,1.4,1.5
seanius at haydn.debian.org
seanius at haydn.debian.org
Sat Apr 1 17:53:44 UTC 2006
Update of /cvsroot/webapps-common/webapps-common/internal
In directory haydn:/org/alioth.debian.org/chroot/home/users/seanius/tmp/cvs-serv2073/internal
Modified Files:
common
Log Message:
another couple misc fixes
Index: common
===================================================================
RCS file: /cvsroot/webapps-common/webapps-common/internal/common,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- common 17 Aug 2005 16:40:41 -0000 1.4
+++ common 1 Apr 2006 17:53:40 -0000 1.5
@@ -45,7 +45,13 @@
local biglist list1 list2 member
list1=$1
list2=$2
- if [ "$list1" ]; then biglist="$list1, "; fi
+ if [ "$list1" ]; then
+ if [ "$list2" ]; then
+ biglist="$list1, "
+ else
+ biglist="$list1"
+ fi
+ fi
if [ "$list2" ]; then biglist="${biglist}$list2"; fi
echo $biglist | sed -e 's/, /\n/g' | sort | uniq | paste -s |\
@@ -65,7 +71,7 @@
list="$1"
query="$2"
- echo $list | sed -e "s/^$query, //" -e "s/, $query\([,\$]\)\?/\1/"
+ echo $list | sed -e "s/^$query\(, \)\?//" -e "s/, $query\([,\$]\)\?/\1/"
}
_wc_list_explode(){
More information about the Webapps-common-discuss
mailing list