🢀︎ stagit :: f22efa0


commit f22efa0111b68330565901964baacc2fe861629e
Author: acidvegas <acid.vegas@acid.vegas>
Date:   Wed Jul 10 01:52:33 2019 -0400

    Identified possible bashisms found by checkbashisms to be fixed

diff --git a/README.md b/README.md
index e0bebff..6be5218 100644
--- a/README.md
+++ b/README.md
@@ -42,6 +42,7 @@ Lastly, the `CNAME` option is required if you are using a custom domain with Git
 * Fix whitespace issue with multi-line echo in generation functions.
 * Sort repositories by basename
 * Fix header padding
+* Fix all possible bashisms identified in source by checkbashisms
 
 ###### Mirrors
 - [acid.vegas](https://acid.vegas/stagit) *(main)*
diff --git a/stagit b/stagit
index 07d2c43..293239d 100755
--- a/stagit
+++ b/stagit
@@ -14,7 +14,7 @@ WWW_DIR=$HOME/www    # directory to output to
 
 generate_css() {
 	if [ $THEME = 'light' ]; then
-		echo -e "a{color:blue}\n"\
+		echo -e "a{color:blue}\n"\ # todo: fix possible bashism
 				"body{background-color:#fff;color:#000;font-family:monospace;margin-top:0px}\n"\
 				"code{counter-increment:line}\n"\
 				"code::before{border-right:1px solid #000;color:#000;content:counter(line);display:inline-block;margin-right:.5em;padding:0 .5em;width:1.5em;-webkit-user-select:none}\n"\
@@ -30,7 +30,7 @@ generate_css() {
 				"#main td,th{padding-left:5px;padding-right:5px}\n"\
 				"#navigation{color:#000;font-weight:900;text-align:left}" >> $WWW_DIR/style.css
 	else
-		echo -e "a{color:#8dc}\n"\
+		echo -e "a{color:#8dc}\n"\ # todo: fix possible bashism
 				"a:hover{color:#8cd}\n"\
 				"body{background-color:#111;color:#fff;font-family:monospace;margin-top:0px}\n"\
 				"code{counter-increment:line}\n"\
@@ -50,7 +50,7 @@ generate_css() {
 }
 
 generate_index() {
-	echo -e "<!doctype html>\n"\
+	echo -e "<!doctype html>\n"\ # todo: fix possible bashism
 			"<link rel=\"stylesheet\" href=\"style.css\">\n"\
 			"<title>Repositories</title>\n"\
 			"<h1><a href=\"index.html\" title=\"Home\">&#8962;&#xFE0E;</a> Repositories</h1>\n"\
@@ -62,9 +62,9 @@ generate_index() {
 generate_repository_index() {
 	local REPO_NAME=$1
 	local REPO_URL=$2
-	local REPO_DESC=${@:3}
+	local REPO_DESC=${@:3} # todo: fix possible bashism
 	mkdir -p $WWW_DIR/$REPO_NAME/commit
-	echo -e "<!doctype html>\n"\
+	echo -e "<!doctype html>\n"\ # todo: fix possible bashism
 			"<link rel=\"stylesheet\" href=\"../style.css\">\n"\
 			"<title>$REPO_NAME</title>\n"\
 			"<h1><a href=\"../index.html\" title=\"Home\">&#8962;&#xFE0E;</a> $REPO_NAME</h1>\n"\
@@ -78,7 +78,7 @@ generate_repository_index() {
 generate_commit_index() {
 	local REPO_NAME=$1
 	local COMMIT_HASH=$2
-	echo -e "<!doctype html>\n"\
+	echo -e "<!doctype html>\n"\ # todo: fix possible bashism
 			"<link rel=\"stylesheet\" href=\"../../style.css\">\n"\
 			"<title>$REPO_NAME :: $COMMIT_HASH</title>\n"\
 			"<h1><a href=\"../index.html\" title=\"Back to Repository\">&#x1F880;&#xFE0E;</a> $REPO_NAME :: $COMMIT_HASH</h1>\n"\
@@ -131,7 +131,7 @@ for d in $(find $REPO_DIR -name .git -type d -prune | sort); do # todo: sort by
 		COMMIT_HASH=$(echo $line | cut -d'|' -f4)
 		COMMIT_MESSAGE=$(echo $line | cut -d'|' -f5 | sed 's/&/\&amp;/g;s/</\&lt;/g;s/>/\&gt;/g;s/"/\&quot;/g;')
 		if [ $MAX_COMMIT_MSG -ne 0 -a ${#COMMIT_MESSAGE} -gt $MAX_COMMIT_MSG ]; then
-			COMMIT_MESSAGE=${COMMIT_MESSAGE:0:$MAX_COMMIT_MSG}...
+			COMMIT_MESSAGE=${COMMIT_MESSAGE:0:$MAX_COMMIT_MSG}... # todo: fix possible bashism
 		fi
 		COMMIT_AUTHOR=$(echo $line | cut -d'|' -f6)
 		COMMIT_DATE=$(echo $line | cut -d'|' -f7)