#!/bin/sh -e

HTDOCS=/home/project-web/nitros9/htdocs
TODAY=$(date +%Y%m%d)

cd $HTDOCS
mkdir latest-$TODAY
cd latest-$TODAY
unzip -o ../nitros9project-$TODAY.zip
echo "Options +Indexes" > .htaccess

cd $HTDOCS
rm latest
ln -s latest-$TODAY latest
rm nitros9project.zip
ln -s nitros9project-$TODAY.zip nitros9project.zip
