#!/usr/bin/make -f none: @echo Content-Type: text/plain @echo @echo usage make site for [re]generate site site: set -x; \ svn update; \ release=`svn log -v --limit 1 http://svn.uvw.ru/mhddfs/tags|\ tail -n2|head -n1|sed 's/-/_/g'`; \ last_version=`echo $$release \ |sed 's/[^[:digit:]]*//'`; \ tarname=mhddfs_$$last_version.tar.gz; \ if ! test -f downloads/$$tarname; then \ svn co http://svn.uvw.ru/mhddfs/tags/$$release \ mhddfs-$$last_version; \ find mhddfs-$$last_version -type d \ -name .svn -exec rm -fr '{}' +; \ tar -czvf downloads/$$tarname mhddfs-$$last_version; \ rm -fr mhddfs-$$last_version; \ svn add downloads/$$tarname; \ svn commit -m release-$$last_version downloads/$$tarname; \ fi; \ make -s dindex > downloads/index.html; \ install -m 0644 index.tmpl.html index.html; \ perl -pi -e "s/#VERSION#/$$last_version/g; \ s/#DATE#/`date +'%d %b %Y'`/g" index.html; \ svn commit -m release-$$last_version index.html dindex: @echo "" @echo "" @echo "mhddfs downloads" @echo "" @echo "" @echo "

index of /downloads

" @echo "
" @echo "" @echo "" @echo " " @echo " " @echo " " @echo " " @echo "" @echo "" @echo "" @echo "" @echo "" @echo "" @echo "" @echo "" @for file in downloads/*; do \ name=`basename $$file`; \ if test $$name = index.html; then continue; fi; \ if test $$name = index.css; then continue; fi; \ echo ""; \ echo " "; \ echo " "; \ echo " "; \ echo " "; \ echo ""; \ done @echo "" @echo "
File NameSizemd5sumDate
..
$$name`du -h $$file|awk '{print $$1}'``md5sum $$file|awk '{print $$1}'``stat -c %y $$file|sed 's/\..*//'`
" @echo "
" @echo "
" @echo '' @echo "
" @echo "" .PHONY: none site