Created
October 22, 2016 16:11
-
-
Save Caio99BR/070e08d326f82ac417cae03af86e62fd to your computer and use it in GitHub Desktop.
Fixed make_changelog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
hg log --template '{author|person} - {desc|firstline} - {date|date}\n' > /tmp/commit_summary | |
if [[ -d .hg || -d .git ]]; then | |
a=0 | |
while read line; do | |
a=$(($a + 1)) | |
done < /tmp/commit_summary | |
i=0 | |
while read line; do | |
summary[$i]=$line | |
i=$(($i + 1)) | |
done < /tmp/commit_summary | |
(cat << EOF) > OLD_DETAILED_CHANGELOG | |
----------------------------------------------------------------------------- | |
Copyright 2009-2010, Ifcaro & jimmikaelkael | |
Licenced under Academic Free License version 3.0 | |
Review Open PS2 Loader README & LICENSE files for further details. | |
----------------------------------------------------------------------------- | |
Open PS2 Loader detailed ChangeLog: | |
EOF | |
b=$a | |
for ((j=0; j<$i; j++)); do | |
echo "rev$a - ${summary[$j]}" >> OLD_DETAILED_CHANGELOG | |
a=$(($a - 1)) | |
done | |
rm -fr /tmp/commit_summary | |
echo "Found $b changesets/commits... DETAILED_CHANGELOG file created." | |
else | |
echo "No .hg/.git folder found, exiting..." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment