From b3be75dbef55ebb4b18ba36d8be5a262d34f3569 Mon Sep 17 00:00:00 2001 From: eudoxia Date: Wed, 30 Dec 2020 01:53:55 -0500 Subject: reload.sh: nav.html only updated on changes to directory structure --- .gitignore | 1 + reload.sh | 11 +++++++++-- 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 ; -- cgit v1.2.3