Skip to content

Instantly share code, notes, and snippets.

@killua99
Created January 20, 2016 07:48
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 killua99/d6dc824eceb74a782c88 to your computer and use it in GitHub Desktop.
Save killua99/d6dc824eceb74a782c88 to your computer and use it in GitHub Desktop.
#!/bin/bash
DATE=`date +%Y%m%d%H%M`
DOCROOT='/mnt/xxxx/www/xxxxxx/docroot'
CURRENT_DIR=`pwd`
CURRENT_BUILD_DIR=$CURRENT_DIR/$DATE
cd $DOCROOT/web
# drupal ce
mkdir -p $CURRENT_BUILD_DIR/web/modules
mkdir -p $CURRENT_BUILD_DIR/config
cp -rf $DOCROOT/composer.json $CURRENT_BUILD_DIR/composer.json
cp -rf $DOCROOT/web/index.php $CURRENT_BUILD_DIR/web/index.php
cp -rf $DOCROOT/web/autoload.php $CURRENT_BUILD_DIR/web/autoload.php
cp -rf $DOCROOT/web/robots.txt $CURRENT_BUILD_DIR/web/robots.txt
cp -rf $DOCROOT/web/update.php $CURRENT_BUILD_DIR/web/update.php
cp -rf $DOCROOT/web/web.config $CURRENT_BUILD_DIR/web/web.config
cp -rf $DOCROOT/config/sync $CURRENT_BUILD_DIR/config/sync
cp -rf $DOCROOT/web/modules/custom $CURRENT_BUILD_DIR/web/modules/custom
cd $CURRENT_BUILD_DIR
composer install
mkdir -p $CURRENT_BUILD_DIR/web/profiles/
cp -rf $DOCROOT/web/profiles/kopernikus $CURRENT_BUILD_DIR/web/profiles/kopernikus
mkdir -p $CURRENT_BUILD_DIR/web/files
mkdir -p $CURRENT_BUILD_DIR/web/sites
rsync -avz -e \
"ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"\
--progress \
$CURRENT_BUILD_DIR/* luigue@xxxx:/var/www/xxxxx.se/docroot
rm -rf $CURRENT_DIR/20*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment