From a31149727b5c8ace780dabd0643560d1ee7cb31a Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Mon, 4 Oct 2021 12:12:28 +0200 Subject: [PATCH] Debug --- refresh.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/refresh.sh b/refresh.sh index 66e5b20..6685cb6 100755 --- a/refresh.sh +++ b/refresh.sh @@ -4,6 +4,7 @@ wai=$(dirname $(readlink -f "$0")) # Current script directory public=${wai}/public projects=${wai}/projects template=${wai}/template.html +main="projectile" # Clean before rm -rf $public/projects @@ -16,9 +17,10 @@ build_links() { for p in $(find ${projects}/ -maxdepth 1 -mindepth 1 -type d) do name=$(basename $p) + [ "$name" == "$main" ] && link="./index.html" || link=${name}.html [ $name == $1 ] && active="active" || active="" - links="${links}\n"''${name}'' + links="${links}\n"''${name}'' done tmp=$(mktemp) echo -e "$links" > $tmp @@ -28,7 +30,7 @@ build_links() { for p in $(find ${projects}/ -maxdepth 1 -mindepth 1 -type d) do name=$(basename $p) - html=${public}/${name}.html + [ "$name" == "$main" ] && html=${public}/index.html || html=${public}/${name}.html js=./projects/$name/index.js content=$p/index.html