blob: 89048f8f475d1dfeb3023f7b10954dd274c43076 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#!/bin/bash
# Check if both scripts exist
if [[ ! -x "./remove-styles.sh" ]]; then
echo "Error: remove-styles.sh not found or not executable!"
exit 1
fi
if [[ ! -x "./add-css.sh" ]]; then
echo "Error: add-css.sh not found or not executable!"
exit 1
fi
# Loop through all .html files in the current directory
for file in *.html; do
# Check if the file exists to handle the case of no matches
if [[ ! -f "$file" ]]; then
echo "No HTML files found in the directory."
exit 0
fi
echo "Processing $file..."
# Call the remove-styles script
./remove-styles.sh "$file"
# Call the add-css script
./add-css.sh "$file"
echo "$file processed successfully!"
done
|