From 38cacb09cf2a37428e3626dad02dc20c919deef8 Mon Sep 17 00:00:00 2001 From: "lovely.wcm" Date: Sat, 3 Oct 2009 16:16:11 +0000 Subject: [PATCH] c2VuZEdGV0xpc3Q6IG9uZSBsb2cgcGVyIGxpbmUK --- sendGFWList.sh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/sendGFWList.sh b/sendGFWList.sh index de3d27e..018d3e8 100755 --- a/sendGFWList.sh +++ b/sendGFWList.sh @@ -51,21 +51,18 @@ do if (( $i%2 == 0 )); then # author temp=${log%%:*}; convertedLog+=${temp%@*}; # don't include "@gmail.com" - convertedLog+=":\""; + convertedLog+=": "; # discard used string log=${log#*:}; else # log, decode it temp=$( echo ${log%%;*} | base64 -d); convertedLog+=$temp; - convertedLog+="\"; "; + convertedLog+="\n"; log=${log#*;}; fi ((i++)); done -# replace last ";" symbol to "." -convertedLog=$( echo $convertedLog | sed 's/;$/\./' ) && - # modified by others, commit to local git repository. if [ "$convertedLog" != "" ]; then svn update && @@ -73,12 +70,11 @@ if [ "$convertedLog" != "" ]; then # save local modification git diff > temp.patch && - # log format: author1:"message1"; author2:"message2"... base64 -d gfwlist.txt > list.txt && - git commit -a -m "$convertedLog"; + echo -e $convertedLog | git commit -a -F - ; # apply local modification - if [ -s temp.patch ]; then git apply temp.patch; fi && + [ -s temp.patch ] && git apply temp.patch && rm temp.patch; fi