From 3676ab38b8497c965d6c4b1e6d0adb3c12146c8f Mon Sep 17 00:00:00 2001 From: RGBCube Date: Sun, 7 May 2023 01:07:38 +0300 Subject: [PATCH] Feat: Ignore files that start with _ --- build.sh | 9 +++++++-- build/src/index.html | 11 ----------- .../_discord-embed-metadata.html | 0 src/discord-embed-metadata.html | 5 ----- src/index.html | 2 +- 5 files changed, 8 insertions(+), 19 deletions(-) delete mode 100644 build/src/index.html rename build/src/discord-embed-metadata.html => src/_discord-embed-metadata.html (100%) delete mode 100644 src/discord-embed-metadata.html diff --git a/build.sh b/build.sh index 3a7d088..19ab826 100755 --- a/build.sh +++ b/build.sh @@ -9,6 +9,11 @@ mkdir ./build for html_file in $(find -name "*.html"); do path=./build/${html_file#./} - mkdir $(dirname $path) 2> /dev/null - sed "/^#/d" <(process $html_file) > $path + + # Preprocess if filename doesn't start with _. + if [[ $(basename $html_file) != _* ]]; then + echo "Building $html_file..." + mkdir $(dirname $path) 2> /dev/null + sed "/^#/d" <(process $html_file) > $path + fi done diff --git a/build/src/index.html b/build/src/index.html deleted file mode 100644 index 189a1f7..0000000 --- a/build/src/index.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - My Site - - - - - - - diff --git a/build/src/discord-embed-metadata.html b/src/_discord-embed-metadata.html similarity index 100% rename from build/src/discord-embed-metadata.html rename to src/_discord-embed-metadata.html diff --git a/src/discord-embed-metadata.html b/src/discord-embed-metadata.html deleted file mode 100644 index 4bc22b0..0000000 --- a/src/discord-embed-metadata.html +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/src/index.html b/src/index.html index e0833c9..6312874 100644 --- a/src/index.html +++ b/src/index.html @@ -2,6 +2,6 @@ My Site - #include "src/discord-embed-metadata.html" + #include "src/_discord-embed-metadata.html"