switched to printf instead of echo

This commit is contained in:
Marc Harter 2012-04-19 11:15:38 -05:00
parent 82c9f9d904
commit 059e01a864

View file

@ -3,7 +3,7 @@
CHANGELOG=`ls | egrep 'change|history' -i`
if test "$CHANGELOG" = ""; then CHANGELOG='History.md'; fi
DATE=`date +'%Y-%m-%d'`
HEAD="\nn.n.n / $DATE \n==================\n"
HEAD="\nn.n.n / $DATE \n==================\n\n"
if test "$1" = "--list"; then
version=`git for-each-ref refs/tags --sort="-*authordate" --format='%(refname)' \
@ -15,9 +15,9 @@ if test "$1" = "--list"; then
fi
else
tmp="/tmp/changelog"
echo $HEAD > $tmp
printf "$HEAD" > $tmp
git-changelog --list >> $tmp
echo '' >> $tmp
printf '\n' >> $tmp
if [ -f $CHANGELOG ]; then cat $CHANGELOG >> $tmp; fi
mv $tmp $CHANGELOG
test -n "$EDITOR" && $EDITOR $CHANGELOG