From fc7460ce78f5cb4ae5446e5e0c95d18d85c0248b Mon Sep 17 00:00:00 2001 From: Cyrille L Date: Fri, 15 Apr 2022 18:56:56 +0200 Subject: [PATCH] Fix : sync no more done on make and www --- control | 2 +- usr/local/bin/gsl | 7 ++----- var/lib/gsl/scripts/gsl__do_commons | 15 +++++++++++---- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/control b/control index 1f632e6..f42d101 100644 --- a/control +++ b/control @@ -1,5 +1,5 @@ Package: egsl -Version: 0.0.32 +Version: 0.0.33 Section: custom Priority: optional Architecture: all diff --git a/usr/local/bin/gsl b/usr/local/bin/gsl index 9327b26..065c6d0 100755 --- a/usr/local/bin/gsl +++ b/usr/local/bin/gsl @@ -1,5 +1,5 @@ #!/bin/bash -# Version: 0.0.32 +# Version: 0.0.33 # file: gsl # Folder: /usr/local/bin # By echolib @@ -358,9 +358,8 @@ case "$1" in "$PWD" gsl_srv_wip="$gsl_site_server/$gsl_site_ndd/wip" - gsl__srv_sync "$gsl_srv_wip" gsl__loop_posts make - + gsl__logs_print \ "$gsl_log_i" \ "Stopping" \ @@ -419,8 +418,6 @@ case "$1" in "$gsl_site_server" gsl_srv_www="$gsl_site_server/$gsl_site_ndd/www" - gsl__srv_sync "$gsl_srv_www" - gsl__loop_posts www "$2" gsl__logs_print \ diff --git a/var/lib/gsl/scripts/gsl__do_commons b/var/lib/gsl/scripts/gsl__do_commons index fd8e095..4374ea2 100644 --- a/var/lib/gsl/scripts/gsl__do_commons +++ b/var/lib/gsl/scripts/gsl__do_commons @@ -127,13 +127,13 @@ esac #====================================================================== gsl__do_italics() { gsl_stat_italics=0 -echo -ne "\r\033[2K: Counting Italics..." while IFS=: read -r "n" "italic" do - [[ `awk -v l="$n" 'NR == l && $1 ~ "_link"' "$2"` ]] && continue - + [[ `awk -v l="$n" 'NR == l && $1 ~ "link"' "$2"` ]] \ + && continue + if [[ "$italic" ]] && \ [[ `grep "$gsl_mark_italic$italic$gsl_mark_italic" "$2"` ]];then @@ -148,9 +148,16 @@ do =~ "$italic" ]] \ && continue - echo -ne "\r\033[2K: Converting Italic... $italic" + # Testing for links + #[[ `awk -v l="$n" 'NR == l' "$2" \ + # | grep -oP "(?<=http).*?(?=$italic)"` ]] \ + # && awk -v l="$n" 'NR == l' "$2" | grep -oPn "(?<=http).*?(?=$italic)" && sleep 1 && echo \ + # && continue + gsl_italic="$gsl_mark_italic$italic$gsl_mark_italic" gsl_html_italic="$italic" + + echo -ne "\r\033[2K: Converting Italic... $italic" sed -i "s|$gsl_italic|$gsl_html_italic|g" "$2" ;; esac