aboutsummaryrefslogtreecommitdiff
path: root/sswg.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sswg.sh')
-rwxr-xr-xsswg.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/sswg.sh b/sswg.sh
index 6e7b42d..d62233d 100755
--- a/sswg.sh
+++ b/sswg.sh
@@ -14,11 +14,10 @@ mkdir "$SSWG_OUTPUT_DIR"
cp -r "$SSWG_ASSETS_DIR"/* "$SSWG_OUTPUT_DIR"/.
# Generate HTML pages
-for page in $(find "$SSWG_PAGES_DIR" -iname '*.html' -o \
- -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.png');
+find "$SSWG_PAGES_DIR" -iname '*.html' -o -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.png' | while read -r page;
do
filename="$SSWG_OUTPUT_DIR/${page##$SSWG_PAGES_DIR/}"
- mkdir -p "`dirname $filename`"
+ mkdir -p "$(dirname "$filename")"
if [ "${filename##*.}" = "html" ]; then
# prepose header
@@ -45,6 +44,6 @@ do
# useful e.g. with <pre> tags
sed -i'' "s/^[ \t]*|//g" "$filename" # remove
else
- cp $page $filename
+ cp "$page" "$filename"
fi;
done;