commit 39035a6294b6c03b846033c4d0fea1087c485a0f parent a5709ca0331ec409325420fa936f7b6eaca3fad0 Author: JayVii <jayvii[AT]posteo[DOT]de> Date: Sun, 28 Apr 2024 21:38:35 +0200 Ensure that exports are excluded from cleanup Diffstat:
M | bin/git_create_repo.sh | | | 4 | ++-- |
M | bin/git_update_repo_html.sh | | | 6 | +++++- |
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/bin/git_create_repo.sh b/bin/git_create_repo.sh @@ -25,11 +25,11 @@ fi # Create Folders mkdir -p "${1}/${2}/${3}/" +mkdir -p "${1}/${2}/${3}/exports/" mkdir -p "${1}/${2}/${3}.git/" -mkdir -p "${1}/${2}/${3}.exp/" # Ensure that export-directory is browsable -echo "Options +Indexes" > "${1}/${2}/${3}.exp/.htaccess" +echo "Options +Indexes" > "${1}/${2}/${3}/exports/.htaccess" # Git-Repository cd "${1}/${2}/${3}.git" || exit 1; diff --git a/bin/git_update_repo_html.sh b/bin/git_update_repo_html.sh @@ -21,7 +21,11 @@ fi cd "${1}/${2}/${3}" || exit 1; # Cleanup directory -find "${1}/${2}/${3}" -type f -name "*.html" -exec rm {} \; +find "${1}/${2}/${3}" \ + -type f \ + -name "*.html" \ + -not -path "${1}/${2}/${3}/exports/*" \ + -exec rm {} \; # build HTML stagit "${1}/${2}/${3}.git"