From 8f82ab261a9c223e605423637b764ce427f155ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ortega=20Froysa?= Date: Mon, 26 Oct 2020 09:42:41 +0100 Subject: [PATCH] Fixed bug with includes. --- sssg.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sssg.sh b/sssg.sh index fd993d1..c70b42a 100755 --- a/sssg.sh +++ b/sssg.sh @@ -40,7 +40,10 @@ function parse { sed -n "1,$end_line{p}" $1 >> _site/$1 else start_line="$(expr ${last_find%%:*} + 1)" - sed -n "$start_line,$end_line{p}" $1 >> _site/$1 + if [ $start_line -le $end_line ] + then + sed -n "$start_line,$end_line{p}" $1 >> _site/$1 + fi fi #inc_file="$(sed "$i!d" $1)" inc_file=${i#*:}