diff --git a/site-inator b/site-inator index 1dc65b6..27019a4 100755 --- a/site-inator +++ b/site-inator @@ -65,6 +65,9 @@ echo ' Website generation will commence now!'; echo; echo; +echo "Removing old data at $OUTPUT_PATH"; +rm -rI $OUTPUT_PATH/; + for file in $(find $SOURCES_PATH/ -iname '*.html'); do clean_path="${file#$SOURCES_PATH/}" @@ -83,6 +86,6 @@ done; echo 'Generation: done!' -[[ -e $STATIC_RESOURCES_PATH/ ]] && (echo "Copying static assets..." && find $STATIC_RESOURCES_PATH/ -maxdepth 1 -exec cp -r {} $OUTPUT_PATH/ ';') +[[ -e $STATIC_RESOURCES_PATH/ ]] && (echo "Copying static assets..." && find $STATIC_RESOURCES_PATH/ -maxdepth 1 -mindepth 1 -exec cp -r {} $OUTPUT_PATH/ ';') echo "Check $OUTPUT_PATH/ for the processed files"