#!/bin/sh [ -d build ] && rm -r build mkdir build cd src TMP=$(mktemp .tmpXXX) find . -maxdepth 1 -type d | cut -c 3- > $TMP cat $TMP | xargs -i sh -c 'mkdir ../build/{}; zip -r ../build/{}/materialy.zip {}' cat $TMP | xargs -i sh -c 'cat _header.html > ../build/{}/index.html; echo "
" >> ../build/{}/index.html; cat {}/opis >> ../build/{}/index.html; cat _footer.html >> ../build/{}/index.html' cat _header.html > ../build/index.html echo "" >> ../build/index.html cat ../README.md >> ../build/index.html echo "" >> ../build/index.html echo "