diff options
Diffstat (limited to 'sswg.sh')
-rwxr-xr-x | sswg.sh | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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; |