Skip to content
Snippets Groups Projects
Unverified Commit f354a4f1 authored by Joas Schilling's avatar Joas Schilling
Browse files

FIx glob usage to avoid problems with directories that contain spaces

parent 4651ff5a
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,7 @@ function recursive_optimize_images() { ...@@ -8,7 +8,7 @@ function recursive_optimize_images() {
jpegoptim --strip-all *.jpg; jpegoptim --strip-all *.jpg;
# Optimize all SVGs # Optimize all SVGs
for svg in `ls *.svg`; for svg in *.svg;
do do
mv $svg $svg.opttmp; mv $svg $svg.opttmp;
scour --create-groups \ scour --create-groups \
...@@ -26,10 +26,12 @@ function recursive_optimize_images() { ...@@ -26,10 +26,12 @@ function recursive_optimize_images() {
rm *.opttmp rm *.opttmp
# Check all subfolders # Check all subfolders
for dir in `ls -d */`; for dir in */
do do
recursive_optimize_images $dir; if [[ -d "$DIR" ]]; then
cd ..; recursive_optimize_images "$dir"
cd ..
fi
done; done;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment