From 783a04b81707f16e708a21b98f90a66fdf01134e Mon Sep 17 00:00:00 2001 From: Cyrille L Date: Mon, 11 Apr 2022 18:45:33 +0200 Subject: [PATCH] fix: error 1 ; was from logs --- control | 2 +- usr/local/bin/gsl | 23 +++++++++++++++++++---- var/lib/gsl/scripts/gsl__log_manager | 12 ++---------- 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/control b/control index 16e4ede..e5a9994 100644 --- a/control +++ b/control @@ -1,5 +1,5 @@ Package: egsl -Version: 0.0.13 +Version: 0.0.14 Section: custom Priority: optional Architecture: all diff --git a/usr/local/bin/gsl b/usr/local/bin/gsl index cada8e5..753d5e4 100755 --- a/usr/local/bin/gsl +++ b/usr/local/bin/gsl @@ -1,5 +1,5 @@ #!/bin/bash -# Version: 0.0.13 +# Version: 0.0.14 # file: gsl # Folder: /usr/local/bin # By echolib @@ -164,7 +164,7 @@ case "$1" in done gsl__logs_show - exit + exit 0 ;; version|-v) @@ -453,5 +453,20 @@ case "$1" in ;; esac -gsl log -s -gsl__logs_check +#---------------------------------------------------------------------- +# Check for process errors or warnings +#---------------------------------------------------------------------- +gsl_logs_last_session=true +gsl__logs_show + +if [[ "$gsl_checker_war" ]];then + echo + gsl_logs_war=true + gsl__logs_show +fi + +if [[ "$gsl_checker_war" ]];then + echo + gsl_logs_err=true + gsl__logs_show +fi diff --git a/var/lib/gsl/scripts/gsl__log_manager b/var/lib/gsl/scripts/gsl__log_manager index da0ba4a..f8f0f59 100644 --- a/var/lib/gsl/scripts/gsl__log_manager +++ b/var/lib/gsl/scripts/gsl__log_manager @@ -4,17 +4,9 @@ # By echolib # License: GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 -#----------------------------------------------------------------------- +#---------------------------------------------------------------------- # Print in log file -#----------------------------------------------------------------------- -gsl__logs_check() { -[[ "$gsl_checker_war" ]] \ - && echo && gsl log -s -w - -[[ "$gsl_checker_err" ]] \ - && echo && gsl log -s -e -} - +#---------------------------------------------------------------------- gsl__logs_print() { #1: Level #2: Type