From 9e59767d4b952cf74804552f7598e167c35cbe61 Mon Sep 17 00:00:00 2001 From: eudoxia Date: Fri, 4 Feb 2022 16:05:22 -0500 Subject: linting --- front.sh | 4 +- md.sh | 128 ++++++++++++++++++++++++++++++------------------------------- nav.sh | 26 ++++++------- plain.sh | 16 ++++---- reload.sh | 2 +- sitemap.sh | 12 +++--- 6 files changed, 94 insertions(+), 94 deletions(-) diff --git a/front.sh b/front.sh index 86d5a45..4ddbe68 100755 --- a/front.sh +++ b/front.sh @@ -5,8 +5,8 @@ set -e cat front-header > $1 -cat distress.network/nav.html | sed -e '/^' >> $2 # util for plain.sh +echo '
' > "$2"	# starting 
 tag
+echo '' >> "$2"	# util for plain.sh
 
 # initial tree generation
 
-tree -dfn --noreport -I 'css|error|favicon|fonts|js|media' $1 >> $2
+tree -dfn --noreport -I 'css|error|favicon|fonts|js|media' "$1" >> "$2"
 
 # remove leading path prefix
 
-sed 's;/var/www/distress\.network;;g' -i'' $2
+sed 's;/var/www/distress\.network;;g' -i'' "$2"
 
 # link generation loop for each line
 
-grep -n '─ ' $2 | \
+grep -n '─ ' "$2" | \
 while IFS='' read -r data ; do
-	LINE=$(echo $data | cut -f 1 -d :) ;		# extract line number
-	FULL=$(echo $data | cut -f 2- -d /) ;		# extract output path
-	NAME=$(echo $FULL | grep -o '[^/]*$') ;		# extract page name (last field of path)
+	LINE=$(echo "$data" | cut -f 1 -d :) ;		# extract line number
+	FULL=$(echo "$data" | cut -f 2- -d /) ;		# extract output path
+	NAME=$(echo "$FULL" | grep -o '[^/]*$') ;		# extract page name (last field of path)
 
 	# at the line number, replace path with link to page
 
-	sed "${LINE}s;─ .*;──${NAME};" -i'' $2 ;
+	sed "${LINE}s;─ .*;──${NAME};" -i'' "$2" ;
 done
 
 # replace starting blank line with root link
 
-sed '3s;.*;·;' -i'' $2
+sed '3s;.*;·;' -i'' "$2"
 
 # hide tree characters for screen readers
 
-sed 's;^\(.\+\)
\n\n" >> "$2" printf "[ok] \tinitial assembly\n" # hack to fix double
 when generating from nav.sh
-sed -e "/^
$/ {n;/^
$/d}" -e "/^<\/pre>$/ {n;/^<\/pre>$/d}" -i'' $2
+sed -e "/^
$/ {n;/^
$/d}" -e "/^<\/pre>$/ {n;/^<\/pre>$/d}" -i'' "$2"
 
 
 sedesc() {
@@ -39,11 +39,11 @@ sedesc() {
 }
 
 TITLE=$(grep -e '^