You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

16 lines
326 B

#!/bin/bash
files=""
in_f="${in_f:=nul}"
out_f="${out_f:=nul}"
out_p="${out_p:=nul}"
for file in "$out_f/$out_p"*; do
if [[ $file == *".html" ]]; then
files+="<li><a href=\"${file##*/}\">${file##*/}</a></li>"
fi
done
out="$(cat "$in_f/index.html")"
echo "${out//'[=index]'/${files}}" > "$out_f/index.html"