From 96ef4c7b7ca7194e0ebde75a31e1451ee37e2568 Mon Sep 17 00:00:00 2001 From: app-harry Date: Sun, 27 Oct 2024 20:50:52 +0800 Subject: [PATCH] update deploy.sh --- deploy.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/deploy.sh b/deploy.sh index d904e07..d60aa1d 100755 --- a/deploy.sh +++ b/deploy.sh @@ -27,12 +27,16 @@ setup_gh() { } flush() { - shopt -s extglob + shopt -s dotglob nullglob - rm -rf !(CNAME|_output) - rm -rf .[^.] .??* !(CNAME|_output) + for item in ./* .[^.]*; do + # skip ./_output and CNAME + if [[ "$item" != "./_output" && "$item" != "./CNAME" ]]; then + rm -rf "$item" + fi + done - shopt -u extglob + shopt -u dotglob nullglob # Move all generated files to the root directory mv ./_output/* ./