Add slip for the git message

This commit is contained in:
Xawirses
2015-04-02 09:10:03 +02:00
parent 51d1cfc463
commit c7573a83cf

View File

@@ -1,10 +1,24 @@
#!/bin/bash #!/bin/bash
TIME="$1 year ago"
IFS=$'\n' IFS=$'\n'
DATA=(`git log --since="1 week ago" --until="now" --no-merges --format='"%H","%ct","%an","%ae","%s",'`) echo "Load data"
LINES=(`git log --since="1 week ago" --until="now" --no-merges --pretty=tformat: --shortstat | gawk '(NF > 0){ printf "%s,%s\n",$1,$4 }' -`) DATA=(`git log --since="$TIME" --until="now" --no-merges --format='%ct,%an,%ae'`)
echo "Load add/remove lines"
LINES=(`git log --since="$TIME" --until="now" --no-merges --pretty=tformat: --shortstat | gawk '(NF > 0){ printf ",%s,%s\n",$1,$4 }' -`)
echo "Load word"
WORD=(`git log --since="$TIME" --until="now" --no-merges --format=',%s'`)
echo "Create .csv"
touch gitlogy.csv
i=0 i=0
while [ $i -lt ${#DATA[@]} ]; do while [ $i -lt ${#DATA[@]} ]; do
echo "${DATA[$i]}${LINES[$i]}" echo "${DATA[$i]}${LINES[$i]}${WORD[$i]}" >> gitlogy.csv
i=$[i + 1] i=$[i + 1]
done done
echo "Parse message"
sed -i -e "s/\ /,/g" gitlogy.csv