Prompt for removal of old data

This commit is contained in:
Yuki Joou 2023-08-18 17:02:30 +02:00
parent 9f0dbfc41c
commit f7eae69b59

View file

@ -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"