Skip to content

Commit

Permalink
Update script to use new backup command format
Browse files Browse the repository at this point in the history
  • Loading branch information
mikevanwinkle committed Nov 20, 2014
1 parent ab7c0f8 commit 02f1a66
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions scripts/create-local.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/bash
SITENAME=${1:?"You must enter the name of the site you want to install."}
TERMINUS='php /home/vagrant/cli/php/boot-fs.php'
LOCAL_DIR="/srv/www/drupal/$1"; #should be an empty dir
DB_NAME="pantheon_$( echo $1 | sed -r 's/-//')"
DBUSER="$( echo $1 | sed -r 's/-//')"
DBPASS="$( echo $1 | sed -r 's/-//')"
LOCAL_DIR="/srv/www/$1"; #should be an empty dir
DB_NAME="pantheon_$( echo $1 | sed -r 's/-//g')"
DBUSER="$( echo $1 | sed -r 's/-//g')"
DBPASS="$( echo $1 | sed -r 's/-//g')"
SITE_ID=$( $TERMINUS site info --site=$SITENAME --bash --nocache=1 | grep id | awk '{print $2}' )
GIT_REMOTE="ssh://codeserver.dev.$SITE_ID@codeserver.dev.$SITE_ID.drush.in:2222/~/repository.git"
echo "GIT_REMOTE=$GIT_REMOTE"
Expand All @@ -15,8 +15,8 @@ fi

cd $LOCAL_DIR

$TERMINUS site get-backup --site=$SITENAME --element=files --env='dev' --to-directory=$LOCAL_DIR || exit 1
$TERMINUS site get-backup --site=$SITENAME --element=database --env='dev' --to-directory=$LOCAL_DIR || exit 1
$TERMINUS site backup get --site=$SITENAME --element=files --env='dev' --to-directory=$LOCAL_DIR || exit 1
$TERMINUS site backup get --site=$SITENAME --element=database --env='dev' --to-directory=$LOCAL_DIR || exit 1

DB=$( ls . | grep "database.*gz" )
FILES=$( ls . | grep "files.*gz" )
Expand Down Expand Up @@ -87,7 +87,7 @@ if [ -f /etc/nginx/nginx-$framework-common.conf ]; then
listen 80;
listen 443 ssl;
server_name local.$SITENAME.dev;
root /srv/www/drupal/$SITENAME/code;
root /srv/www/$SITENAME/code;
include /etc/nginx/nginx-$framework-common.conf;
}' > /etc/nginx/custom-sites/$SITENAME.conf"

Expand Down

0 comments on commit 02f1a66

Please sign in to comment.