#!/usr/local/bin/dash
# concatenate html files & .plan then write to http root
tin_img=tinman.png
cd ~/prep_html
cp ~/.plan ~/.project store_plan_proj
git add store_plan_proj
git commit -m 'usual updates to plan & project'
sed "s/TINMAN/$tin_img/g" top.tmpl > top.html
sed "s/^Status:/Status (`date +%Y-%m-%d`):/" ~/.project > project.cooked
sed 's|^Status.*:$|&|' project.cooked > project.done
cat top.html ~/.plan mid.html project.done end.html > ~/public_html/index.html
if [ ! -e ~/public_html/$tin_img ]; then cp $tin_img ~/public_html; fi
rm project.cooked project.done top.html