summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreudoxia <uplink@distress.network>2020-12-30 01:53:55 -0500
committereudoxia <uplink@distress.network>2020-12-30 01:53:55 -0500
commitb3be75dbef55ebb4b18ba36d8be5a262d34f3569 (patch)
tree7327e179be7eeb0e0a82bc880b95ec7feafe701f
parent3cbdaa504f405ea1ac89c2fe50252c46c7011b9f (diff)
reload.sh: nav.html only updated on changes to directory structure
-rwxr-xr-x.gitignore1
-rwxr-xr-xreload.sh11
2 files changed, 10 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index b567d8f..27206b0 100755
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
distress.network
shadow
+.sha256
diff --git a/reload.sh b/reload.sh
index a67cd3b..27cacce 100755
--- a/reload.sh
+++ b/reload.sh
@@ -9,8 +9,15 @@ while IFS='' read -r data ; do
done
}
-sh ./nav.sh distress.network distress.network/nav.html > /dev/null
-printf "[ok] \tnav embed\n"
+sha=$(find -L distress.network | sed '/.git/d' | sort | sha256sum)
+
+if [ "$(cat .sha256)" = "$sha" ] ; then
+ printf "[ok] \tignoring nav embed\n" ;
+else
+ sh ./nav.sh distress.network distress.network/nav.html > /dev/null ;
+ echo "$sha" > .sha256 ;
+ printf "[ok] \tnav embed\n" ;
+fi
if [ "$1" = -r ] ; then
rebuild ;