3 echo "Usage $0 full_path_to_the_source_file"
6 fileName=$(basename $1)
9 glog=$(git log --pretty=format:'%H %cD %an %s' -n 25 ${fileName}|awk ' ORS=" "{print \
11 "\"commit\": \"" $1 "\",\n" \
12 "\"date\": \""$2 " "$3" "$4" "$5 " "$6 "\",\n" \
13 "\"author\": \"" $8 ", "$9 "\",\n" \
14 "\"comment\": \""} { s = ""; for (i = 10; i <= NF; i++) s = s $i " "; print s } { print "\"\n},"}')
16 update_glog=$(echo $glog|sed -e 's/,$//g')