#!/bin/bash DATE=`date +%Y-%m-%d` DIR="/home/www/www.phpguru.org/htdocs/downloads/datagrid/$DATE" clear # Delete the "latest" link echo "Deleting the current release directory" rm -f /home/www/www.phpguru.org/htdocs/downloads/datagrid/latest rm -rf $DIR # Make the new release directory echo "Creating new release dir ($DIR)" mkdir $DIR # Copy the files over echo "Copying the files over" cp -R /home/www/www.phpguru.org/htdocs/datagrid/* $DIR # Recreate the link echo "Recreating the link" ln -s $DIR /home/www/www.phpguru.org/htdocs/downloads/datagrid/latest