update bug fix
[lace] / laced
diff --git a/laced b/laced
index a9424b5ca22b1b5b086eaa0f15eceaf1a54c0c9e..d779bb76fd3c46adbe48e9f2656ee3537dac3e0a 100755 (executable)
--- a/laced
+++ b/laced
@@ -109,7 +109,15 @@ function timeline() {
        done<$tmpfile
 
        cat $tmpfile2 | sed "s/^\([0-9]* [a-z]* ago\)$/${esc}$blue\1${esc}$nc/g" >$tmpfile
+       wordcount="$(wc -c $tmpfile | awk '{print $1}')"
+       if [[ "$wordcount" > 100 ]]; then
        cp $tmpfile $config_place/microblogs.gmi 
+       else
+               
+sed -i '1i Laced could not connect to the Internet showing previous download' $config_place/microblogs.gmi
+
+       fi
+
 
        rm -f $tmpfile $tmpfile2
        }
@@ -130,7 +138,7 @@ elif [[ "$1" == "unsub" ]];then
 elif [[ "$1" == "subs" ]];then
        awk '{print $2" ("$1")"}' $subsfile 
 elif [[ "$1" == "update" ]];then
-       curl https://raw.githubusercontent.com/frrobert2/lace/main/lace > "${BASH_SOURCE[0]}"
+       curl https://raw.githubusercontent.com/frrobert2/lace/main/laced > "${BASH_SOURCE[0]}"
 else
        now_unix="$(date +'%s')"
                timeline