From 5339654c63b198d978a63a9031dcf19d6f88e7d1 Mon Sep 17 00:00:00 2001 From: archetipico Date: Tue, 19 Oct 2021 15:01:03 +0200 Subject: [PATCH] Fix bug Fixed .hist not being created --- src/emerger.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/emerger.sh b/src/emerger.sh index ae0ccff..bbd3514 100755 --- a/src/emerger.sh +++ b/src/emerger.sh @@ -15,6 +15,9 @@ if [[ $(wc -l < $ROOT.log) -gt 256 ]]; then printf "$(tail -n 256 $ROOT.log)\n" > $ROOT.log fi +# If the script got interrupted, history still exists and has to be cleaned +echo -n "" > $SRC/.hist + ARGC=$# ARGV=$@ @@ -50,9 +53,6 @@ else fi chmod 775 $SRC/utils/.md5 - # If the script got interrupted, history still exists and has to be cleaned - echo -n "" > $SRC/.hist - # Logo if [[ ! $ARGV =~ "-nl" ]]; then if [[ $(stty size | awk '{print $2}') -ge 74 ]]; then @@ -105,10 +105,11 @@ else if [[ $(grep -v "[0-9]*:[0-9]*:[0-9]*:[0-9]*" $ROOT.log | wc -l) -gt 0 ]]; then puts LOGO "\n\nSomething is not working correctly, type \"up -err\" for further informations\a" fi + + reset + echo -ne "${BLUE}eMerger COMPLETED$NORMAL\n" fi -reset -echo -ne "${BLUE}eMerger COMPLETED$NORMAL\n" rm $SRC/.hist exit 0