diff --git a/backup-conf.sh b/backup-conf.sh index dcf8c06..09ba35b 100755 --- a/backup-conf.sh +++ b/backup-conf.sh @@ -53,16 +53,19 @@ copy() { if [[ -f $1 ]]; then cp $1 $2; fi } +# Backup folder + +dest=$HOME/Documents/Configurations/SilverBook + # Web: PHP / Apache / MySQL +dest_mamp=$dest/config\ web\ \(homebrew\)/ +cd "$dest_mamp" + CURRENT_APACHE=$(httpd -v | grep "version" | awk '{print $3}' | awk -F/ '{print $2}') CURRENT_PHP=$(php -v | grep "cli" | awk '{print $2}') CURRENT_MYSQL=$(mysql -V | awk '{print $5}' | sed 's/.$//') -dest=$HOME/Documents/Configurations/SilverBook -dest_mamp=$dest/config\ web\ \(homebrew\)/ -cd "$dest_mamp" - if [ ! -d "apache $CURRENT_APACHE" ]; then mkdir "apache $CURRENT_APACHE"; fi cp /usr/local/etc/httpd/httpd.conf "$dest_mamp/apache $CURRENT_APACHE/" cp /usr/local/etc/httpd/server.crt "$dest_mamp/apache $CURRENT_APACHE/"