This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install system libraries. | |
sudo apt-get install zlib1g-dev openssl libssl-dev libreadline-dev git-core | |
# Install rbenv. | |
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv | |
# Setup bash. | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
echo 'eval "$(rbenv init -)"' >> ~/.bashrc | |
exec $SHELL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# How to use | |
# my_script_name bd_user db_pass project_name(should be same name on database and project_directory) | |
# by Alfredo Ribeiro: [email protected] | |
# Create the daily backup, delete old backups, and each month, make a copy last backup on a separated directory | |
mysql_user=$1 | |
mysql_pass=$2 | |
project_name=$3 |