Last active
December 19, 2015 15:59
-
-
Save ernestoalejo/5980229 to your computer and use it in GitHub Desktop.
FTP deploy file for cb
This file contains hidden or 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 | |
if [ "$1" == "" ]; then | |
echo "first arg should be the user name" | |
exit 1 | |
fi | |
USER=$1 | |
DATE="deploy-"`date +%s` | |
HOST="ftp.latala.altiplaconsulting.com" | |
read -s -p "Enter Password: " PASS | |
echo -n | |
lftp -c "set ftp:list-options -a; | |
set ftp:ssl-allow off; | |
open -u $USER,$PASS $HOST; | |
lcd ./deploy; | |
mkdir $DATE; | |
mv app/storage storage-$DATE | |
mv app $DATE/app; | |
mv bootstrap $DATE/bootstrap; | |
mv public_html $DATE/public_html; | |
mv vendor $DATE/vendor; | |
cd $DATE; | |
mirror --reverse --delete --use-cache --verbose --allow-chown --no-umask \ | |
--parallel=2 --exclude .git --exclude .hg --exclude test-suite --exclude test; | |
mv app ../app; | |
mv bootstrap ../bootstrap; | |
mv public_html ../public_html; | |
mv vendor ../vendor; | |
cd ..; | |
mv storage-$DATE app/storage | |
mkdir app/storage/cache | |
mkdir app/storage/logs | |
mkdir app/storage/meta | |
mkdir app/storage/sessions | |
mkdir app/storage/views | |
rmdir $DATE; | |
" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment