From d4a13105b467d2b3bd537dd2e83363e6fb545aea Mon Sep 17 00:00:00 2001 From: Cyrille L Date: Thu, 14 Apr 2022 17:00:54 +0200 Subject: [PATCH] Fix loop for lists --- control | 2 +- usr/local/bin/gsl | 10 +--------- var/lib/gsl/scripts/gsl__post_makers | 3 +-- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/control b/control index 7062e9a..08ab10a 100644 --- a/control +++ b/control @@ -1,5 +1,5 @@ Package: egsl -Version: 0.0.22 +Version: 0.0.23 Section: custom Priority: optional Architecture: all diff --git a/usr/local/bin/gsl b/usr/local/bin/gsl index e329b1b..05f9e46 100755 --- a/usr/local/bin/gsl +++ b/usr/local/bin/gsl @@ -1,5 +1,5 @@ #!/bin/bash -# Version: 0.0.22 +# Version: 0.0.23 # file: gsl # Folder: /usr/local/bin # By echolib @@ -408,14 +408,6 @@ case "$1" in ;; list|-l) - ! [[ "$2" ]] \ - && echo "! Set argument: add|-A/remove|-R" \ - && exit - - ! [[ "$3" ]] \ - && echo "! Set a position number in list (max=$gsl_list_max_posts)" \ - && exit - case "$2" in add|-A) gsl_listing_process="add" ;; remove|-R) gsl_listing_process="remove" ;; diff --git a/var/lib/gsl/scripts/gsl__post_makers b/var/lib/gsl/scripts/gsl__post_makers index 2645cce..10c925d 100644 --- a/var/lib/gsl/scripts/gsl__post_makers +++ b/var/lib/gsl/scripts/gsl__post_makers @@ -100,7 +100,7 @@ awk -v s="$1" \ # Convert List.Get first/last line item / repeat till no more mark #====================================================================== gsl__make_list() { -unset gsl_found_list gsl_html_uol +unset gsl_found_list if [[ `awk -v m="$gsl_mark_list" \ '$1 == m {print $1;exit}' \ "$gsl_tmp_post"` ]];then @@ -238,7 +238,6 @@ gsl_list_line_i=$(( gsl_list_o - 1)) sed -i "${gsl_list_line_i}r $gsl_HTML_list" "$gsl_tmp_post" rm -f "$gsl_HTML_list" # No more needed HTML tmp file list -gsl__make_list } #----------------------------------------------------------------------