mirror of
https://github.com/gfwlist/gfwlist.git
synced 2024-11-10 18:25:18 +00:00
c2VuZEdGV0xpc3Q6IG9uZSBsb2cgcGVyIGxpbmUK
This commit is contained in:
parent
90297155c7
commit
38cacb09cf
@ -51,21 +51,18 @@ do
|
|||||||
if (( $i%2 == 0 )); then # author
|
if (( $i%2 == 0 )); then # author
|
||||||
temp=${log%%:*};
|
temp=${log%%:*};
|
||||||
convertedLog+=${temp%@*}; # don't include "@gmail.com"
|
convertedLog+=${temp%@*}; # don't include "@gmail.com"
|
||||||
convertedLog+=":\"";
|
convertedLog+=": ";
|
||||||
# discard used string
|
# discard used string
|
||||||
log=${log#*:};
|
log=${log#*:};
|
||||||
else # log, decode it
|
else # log, decode it
|
||||||
temp=$( echo ${log%%;*} | base64 -d);
|
temp=$( echo ${log%%;*} | base64 -d);
|
||||||
convertedLog+=$temp;
|
convertedLog+=$temp;
|
||||||
convertedLog+="\"; ";
|
convertedLog+="\n";
|
||||||
log=${log#*;};
|
log=${log#*;};
|
||||||
fi
|
fi
|
||||||
((i++));
|
((i++));
|
||||||
done
|
done
|
||||||
|
|
||||||
# replace last ";" symbol to "."
|
|
||||||
convertedLog=$( echo $convertedLog | sed 's/;$/\./' ) &&
|
|
||||||
|
|
||||||
# modified by others, commit to local git repository.
|
# modified by others, commit to local git repository.
|
||||||
if [ "$convertedLog" != "" ]; then
|
if [ "$convertedLog" != "" ]; then
|
||||||
svn update &&
|
svn update &&
|
||||||
@ -73,12 +70,11 @@ if [ "$convertedLog" != "" ]; then
|
|||||||
# save local modification
|
# save local modification
|
||||||
git diff > temp.patch &&
|
git diff > temp.patch &&
|
||||||
|
|
||||||
# log format: author1:"message1"; author2:"message2"...
|
|
||||||
base64 -d gfwlist.txt > list.txt &&
|
base64 -d gfwlist.txt > list.txt &&
|
||||||
git commit -a -m "$convertedLog";
|
echo -e $convertedLog | git commit -a -F - ;
|
||||||
|
|
||||||
# apply local modification
|
# apply local modification
|
||||||
if [ -s temp.patch ]; then git apply temp.patch; fi &&
|
[ -s temp.patch ] && git apply temp.patch &&
|
||||||
rm temp.patch;
|
rm temp.patch;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user