diff options
author | keni7385 <andrea@andreacorsini.xyz> | 2022-07-25 23:18:03 +0200 |
---|---|---|
committer | keni7385 <andrea@andreacorsini.xyz> | 2022-07-25 23:18:03 +0200 |
commit | 082cbf264a2f357786cc5030e5453bd9d0bb638c (patch) | |
tree | d37581992ffd4454b483a230c23723324439f5d4 /sswg.sh | |
parent | 90065a4b6655e4b16fda0e0fe1a93c0b30ad1d25 (diff) |
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; |