21 lines
480 B
Bash
Executable File
21 lines
480 B
Bash
Executable File
#!/bin/bash
|
|
|
|
content_dir="./content"
|
|
public_dir="./public"
|
|
|
|
cp "$sitemap_file" "$temp_sitemap_file"
|
|
|
|
for file in "$content_dir"/*; do
|
|
file_name=$(basename "$file")
|
|
folder_name="${file_name%.*}"
|
|
folder_name_dashed=$(echo "$folder_name" | tr '_' '-')
|
|
folder_path="$public_dir/$folder_name_dashed"
|
|
|
|
if [ -d "$folder_path" ]; then
|
|
rm -r "$folder_path"
|
|
echo "Removed: $folder_path"
|
|
else
|
|
echo "Folder not found: $folder_path"
|
|
fi
|
|
done
|