From 6e007a32fa4cfec55a4dc4e02a2a3ed797f980c8 Mon Sep 17 00:00:00 2001 From: lovelywcm Date: Sun, 18 Apr 2010 18:04:46 +0000 Subject: [PATCH] c29tZSBtaW5vciBlbmhhbmNlbWVudHMgb2Ygc2NyaXB0Cg== --- sendGFWList.sh | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/sendGFWList.sh b/sendGFWList.sh index f44e611..b491676 100755 --- a/sendGFWList.sh +++ b/sendGFWList.sh @@ -2,14 +2,14 @@ # # A simple script help to maintain AutoProxy gfwList easily. # -# Function: +# Features: # Update local svn repository; # Commit decoded changes(by others in your team) to local git repository # with decoded message and authors name; -# Update "Last Modified" time; -# Update "Checksum"; +# Update "Last Modified" & "Checksum"; # Commit your changes to local git repository; -# Commit your encoded changes to remote svn server with encoded log. +# Commit your encoded changes to remote svn server with encoded log; +# Plus some error handling. # Usage: # Initialize: # $svn checkout https://autoproxy-gfwlist.googlecode.com/svn/trunk/ gfwList --username your-google-user-name @@ -40,7 +40,7 @@ done # get formated author and log information log=$(svn log --xml -r BASE:HEAD) || exit 1; -log=$(echo $log | awk -v RS='' -F '|' '{ for(i=6;i|' '{ for(i=6;i gfwlist.txt && # may be failed because of connection/authentication problems - svn ci gfwlist.txt -m $( echo "$*" | openssl base64 | tr -d '\n') || + svn ci gfwlist.txt -m $( echo "$*" | openssl base64 | tr -d '\r\n' ) || # "svn ci" and "git commit" are atomic operations git reset HEAD^ 1> /dev/null;