Skip to content

Instantly share code, notes, and snippets.

@alexandresalome
Created July 20, 2010 12:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexandresalome/482880 to your computer and use it in GitHub Desktop.
Save alexandresalome/482880 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# Synchronization script for a project.
#
# This script will synchronize with production environment
#
[ "$1" = "go" ] && DryRun="" || DryRun="--dry-run"
[ "$1" = "go" ] && DeleteCommand="rm -rf" || DeleteCommand="ls"
[ "$2" = "fast" ] && GoFast="-x ^lib/vendor" || GoFast=""
lftp \
-u tonid \
-e "mirror -e \
--reverse --verbose --only-newer $DryRun \
$GoFast \
\
-x ^build \
-x ^cache \
-x ^log \
\
-x ^web/.htaccess \
-x ^web/frontend_dev.php \
-x ^web/php.ini \
\
-x .git \
-x .DS_Store \
-x nbproject \
\
/var/git/aproject/ \
/; \
$DeleteCommand /cache/frontend; \
exit" \
ahost
@hartym
Copy link

hartym commented Jul 20, 2010

Tu vends des secrets sur github maintenant ?

@alexandresalome
Copy link
Author

Non non, c'est totalement gratuit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment