I have written a very simple bash script to help me migrate from dev to staging. What it does is it deletes all files in staging, copies the files over from dev to stage.

However, the config.inc.php file needs to have the first instance of "dev" to be changed to "stage", and no other instance changed.

Second, everytime I run it (I run the script from the dev directory), i'd like it to write a log back in the dev directory which will append the date/time stamp that I ran the staging bash script into this log.

Thanks.