Created
July 11, 2017 12:43
-
-
Save colinappnovation/777dca8968a777e4b4be4dc567934798 to your computer and use it in GitHub Desktop.
Bash Script to automate D8 alongside Docker4Drupal
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 | |
# Clone into directory | |
git clone [email protected]:colinappnovation/drupal-project.git --depth=1 $1 | |
# move into new folder | |
cd $1 | |
# Bring in docker4drupal | |
wget https://raw.githubusercontent.com/wodby/docker4drupal/master/docker-sync.yml | |
wget https://raw.githubusercontent.com/wodby/docker4drupal/master/docker-compose.yml | |
# Replace strings in two files above | |
sed -i '' "s/docker-sync/${1}/g" ./docker-sync.yml | |
# Uncomment docker-sync stuff at base of file | |
sed -i '' '210,211 s/^#//' docker-compose.yml | |
sed -i '' "210 s/docker-sync/${1}/" ./docker-compose.yml | |
# Clean up things | |
rm -rf .git/ | |
rm .travis.yml | |
rm LICENSE | |
rm README.md | |
rm phpunit.xml.dist | |
# Composer run | |
#composer install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cmod +x boot-project.sh
2) Run the script passing param/argument 1 e.g. test
./boot-project.sh test => arg 1 = "test" therefore through script is replaced accordingly i.e. ${1}