From: frrobert2 Date: Wed, 12 May 2021 23:26:31 +0000 (-0400) Subject: added some additional error checking to laced X-Git-Url: https://software.frrobert.com/lace/commitdiff_plain/d56700dead0f2e77623e8724a48244880fc5f9dc added some additional error checking to laced --- diff --git a/laced b/laced index a9424b5..77e8e6b 100755 --- 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 }