[fix] cosmetic

This commit is contained in:
alban 2020-05-16 01:34:45 +02:00
parent 031aad7aa3
commit 756cc3957a

View File

@ -9,13 +9,14 @@ CHANGELOG=/etc/changelog
msg(){ echo -e "$@"; }
panic(){ msg "${@} Exiting."; exit 1;}
template(){
t=$(mktemp)
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"