#!/bin/sh # generate fs files because we can't do directory traversal from js within a # browser. for d in ./startpage/root/*; do if [ ! -d "$d" ]; then continue fi s="" for f in "$d"/*; do s=${s:+$s\\n}$(echo "$f" | cut -d '/' -f 5-) done echo "$s" > ./startpage/root/."$(echo "$d" | cut -d '/' -f 4-)" done