blob: fd8cd379ae2b06facdd575822a2b1c907f31a8a7 [file] [log] [blame]
Chinthakayala, Sheshashailavas (sc2914)d1569972017-08-28 05:25:46 -09001if [ "$#" != "1" ]
2then
3 echo "Usage $0 full_path_to_the_source_file"
4 exit
5fi
6fileName=$(basename $1)
7dirName=$(dirname $1)
8cd $dirName
9glog=$(git log --pretty=format:'%H %cD %an %s' -n 25 ${fileName}|awk ' ORS=" "{print \
10"\n{\n" \
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},"}')
15echo "["
16update_glog=$(echo $glog|sed -e 's/,$//g')
17echo $update_glog
18echo "]"