#!/bin/sh ## makes the nitpo web site ME=`/usr/bin/whoami` ORIGIN=~/nitpo/ TARGET=~/web/opt/nitpo/ ARCHIVE=$TARGET/nitpo.tar.gz TEMPARC=/tmp/nitpo.tar.gz rm -r $TARGET mkdir $TARGET ## obsolete is on the web, not in the tarball rm -rf $TARGET/obsolete rsync -qa --exclude obsolete --exclude '*~' --exclude .\#* --exclude tmp --exclude __pycache__ $ORIGIN $TARGET rm -f $TEMPARC cd $TARGET tar -czf $TEMPARC . 2> /dev/null mv $TEMPARC $ARCHIVE ## again rsync with obsolete rsync -qa --exclude '*~' --exclude .\#* --exclude tmp --exclude __pycache__ $ORIGIN $TARGET ## make index page cd $TARGET rm index.html ln -s doc/index.html index.html cd rsync -va --delete $TARGET $ME@nitpo.openlib.org:$TARGET