I have a website and i have 3 versions
I have the beta version with the most recent and usually not fully working changes.
I have the public site that is on www.
lastly, i have the history that I copy my old versions to when I move the beta to the public
I want to make a bash file that I run that will first copy the current public site to the "history/current year/current month/current day/"
then it clears out the public directory and copies the beta to the public
finally it prints that it is finished
can someone make a sample bash script for me? i know how to create dirs and copy them and print i just need help with the current date thing
Thanks, Ciaran
Here you're the script:
/www
with your server's base path.public_html
with the public folder.beta
with your beta folder.I've echoed all the "serious" lines. Run the program.
It will only echo the commands, not run them.
If all goes well, then remove all the echoes at the line begin and run again.