From d56700dead0f2e77623e8724a48244880fc5f9dc Mon Sep 17 00:00:00 2001 From: frrobert2 Date: Wed, 12 May 2021 19:26:31 -0400 Subject: [PATCH] added some additional error checking to laced --- laced | 8 ++++++++ 1 file changed, 8 insertions(+) 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 } -- 1.8.3.1