language files update
[open-ps2-loader.git] / scripts / make_changelog.sh
blob935e67d5f8e66988497f30cb059830bdf216ec57
1 #!/bin/bash
3 hgchangeset=`eval hg log | grep changeset: | sed -n 's/changeset: *//p' | sed -n 's/:[^.]*//p'`
4 hg log | grep summary: | sed -n 's/summary: *//p' >rev_summary
5 hg log | grep date: | sed -n 's/date: *//p' >rev_date
7 i=0
8 changeset_array=$(echo $hgchangeset | tr " " "\n")
9 for x in $changeset_array; do
10 changeset[$i]=$x
11 i=$(($i + 1))
12 done
13 echo "found $i revision changesets..."
15 i=0
16 while read line; do
17 summary[$i]=$line
18 i=$(($i + 1))
19 done <rev_summary
20 echo "found $i revision summaries..."
22 i=0
23 while read line; do
24 date[$i]=$line
25 i=$(($i + 1))
26 done <rev_date
27 echo "found $i revision dates..."
29 echo "-----------------------------------------------------------------------------" >DETAILED_CHANGELOG
30 echo "" >>DETAILED_CHANGELOG
31 echo " Copyright 2009-2010, Ifcaro & jimmikaelkael" >>DETAILED_CHANGELOG
32 echo " Licenced under Academic Free License version 3.0" >>DETAILED_CHANGELOG
33 echo " Review Open PS2 Loader README & LICENSE files for further details." >>DETAILED_CHANGELOG
34 echo "" >>DETAILED_CHANGELOG
35 echo "-----------------------------------------------------------------------------" >>DETAILED_CHANGELOG
36 echo "" >>DETAILED_CHANGELOG
37 echo "Open PS2 Loader detailed ChangeLog:" >>DETAILED_CHANGELOG
38 echo "" >>DETAILED_CHANGELOG
40 for ((j=0; j<$i; j++)); do
41 echo "rev${changeset[$j]} - ${summary[$j]} - ${date[$j]}" >>DETAILED_CHANGELOG
42 done
44 rm rev_summary
45 rm rev_date
46 cp -f DETAILED_CHANGELOG ../
47 rm DETAILED_CHANGELOG
49 echo "DETAILED_CHANGELOG file created."