Begin repository based on build_source main
This commit is contained in:
commit
208a90e7b9
6 changed files with 27379 additions and 0 deletions
17
scripts/pull.sh
Executable file
17
scripts/pull.sh
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
# Confirmed with echo `pwd` that as long as we use via composer it's always in
|
||||
# /var/www/html (aka the project root).
|
||||
proj_dir="$(cd $(dirname ${0})/../ && pwd)" # Parent of this script folder.
|
||||
[ "$proj_dir" != "/var/www/html" ] && { echo "Script running from unexpected path - are you running within ddev, as you should?"; exit 1; }
|
||||
backup_file="$(date +%Y%m%dT%H%M%S)_pre_pull.sql"
|
||||
[ ! -d /var/www/html/backups ] && mkdir /var/www/html/backups || true
|
||||
echo "Backing up current db to backups/${backup_file}..."
|
||||
drush sql-dump > /var/www/html/backups/${backup_file}
|
||||
echo "Dropping local db..."
|
||||
drush -y sql-drop
|
||||
echo "Pulling db from live into local..."
|
||||
drush -y sql-sync @live @self
|
||||
echo "Pulling files from live into local..."
|
||||
drush -y rsync @live:%files @self:%files
|
||||
echo "Done"
|
7
scripts/retain-custom-htaccess.sh
Executable file
7
scripts/retain-custom-htaccess.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ -f ./web/.htaccess.custom ]
|
||||
then
|
||||
cd web && mv .htaccess .htaccess.default && cp .htaccess.custom .htaccess
|
||||
git diff -s --exit-code .htaccess.default || echo 'NOTE: .htaccess.default file has changed! Be sure to integrate latest updates into .htaccess and .htaccess.custom, then commit all three files. For example, meld web/.htaccess.custom web/.htaccess.default'
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue