diff options
author | eudoxia <uplink@distress.network> | 2020-12-30 01:53:55 -0500 |
---|---|---|
committer | eudoxia <uplink@distress.network> | 2020-12-30 01:53:55 -0500 |
commit | b3be75dbef55ebb4b18ba36d8be5a262d34f3569 (patch) | |
tree | 7327e179be7eeb0e0a82bc880b95ec7feafe701f | |
parent | 3cbdaa504f405ea1ac89c2fe50252c46c7011b9f (diff) |
reload.sh: nav.html only updated on changes to directory structure
-rwxr-xr-x | .gitignore | 1 | ||||
-rwxr-xr-x | reload.sh | 11 |
2 files changed, 10 insertions, 2 deletions
@@ -1,2 +1,3 @@ distress.network shadow +.sha256 @@ -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 ; |