File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed
Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change 7878 fi
7979}
8080
81+ clean_directory () {
82+ if [ -d " $$ 1" ]; then rm -rf " $1 " ; fi
83+ }
84+
8185clean_repo () {
8286 _ " 🧹 Cleaning Git repository"
8387 git reset --hard
@@ -263,16 +267,16 @@ if [[ $use_git -eq 1 ]]; then
263267 # Supposing all assets are in the branch in root level (/)
264268 # Do not remove .ico and .sg files ; keep the ones already existing in the branch
265269 # Do not remove theme-settings.json
266- rm -rf " css"
267- rm -rf " data"
268- rm -rf " documentation"
269- rm -rf " images"
270- rm -rf " img"
271- rm -rf " index"
272- rm -rf " js"
273- rm -rf " *.jpg"
274- rm -rf " * .html"
275- rm -rf " CNAME"
270+ clean_directory " css"
271+ clean_directory " data"
272+ clean_directory " documentation"
273+ clean_directory " images"
274+ clean_directory " img"
275+ clean_directory " index"
276+ clean_directory " js"
277+ clean_directory " *.jpg"
278+ clean_directory " .html"
279+ clean_directory " CNAME"
276280
277281 # Copy all files from temporary folder to branch
278282 cp -r " $DOCUMENTATION_HTML_LOCATION " /* " $DOCS_DIRECTORY "
You can’t perform that action at this time.
0 commit comments