From 756cc3957a0009263d49a27deb85317089c079e4 Mon Sep 17 00:00:00 2001 From: alban Date: Sat, 16 May 2020 01:34:45 +0200 Subject: [PATCH] [fix] cosmetic --- changelog | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/changelog b/changelog index 63ecff3..70a65a2 100755 --- a/changelog +++ b/changelog @@ -9,16 +9,17 @@ CHANGELOG=/etc/changelog msg(){ echo -e "$@"; } panic(){ msg "${@} Exiting."; exit 1;} template(){ -t=$(mktemp) -cat << HEREDOC >$t + local t=$(mktemp) + cat << HEREDOC >$t $(date "+%Y-%m-%d %H:%M") $CHANGELOG_USERNAME $( echo -e "$@"|sed 's/^/ /' ) HEREDOC -[[ -f $CHANGELOG ]] && cat /etc/changelog >> $t -cat "$t" > $CHANGELOG -rm -f "$t" + + [[ -f $CHANGELOG ]] && cat /etc/changelog >> $t + cat "$t" > $CHANGELOG + rm -f "$t" } change(){