Last active
January 22, 2019 21:19
-
-
Save georgerussellpruitt/4d89e6bbb96205a60239a3929a525e80 to your computer and use it in GitHub Desktop.
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 | |
# this is the first script to execute which performs | |
# checks that everything is installed and operating as expected | |
$INSTALLED="/var/git/WordPress" | |
$DIRECTORY="/var/git/" | |
# install aws command line utility | |
apt install -y awscli | |
if [ -d "$INSTALLED" ]; | |
then | |
# directory existed do pull | |
# change to dir | |
cd $INSTALLED | |
# Get new tags from the remote and checkout latest tag | |
git fetch --tags | |
latestTag=$(git describe --tags `git rev-list --tags --max-count=1`) | |
git checkout $latestTag | |
else | |
# directory didnt exist do clone | |
cd $DIRECTORY | |
# Grab wordpress | |
git clone https://github.com/WordPress/WordPress.git | |
cd WordPress/ | |
# Get new tags from the remote and checkout latest tag | |
git fetch --tags | |
latestTag=$(git describe --tags `git rev-list --tags --max-count=1`) | |
git checkout $latestTag | |
cd $DIRECTORY | |
#checkout ket umbrella/stack repository | |
git clone https://bitbucket.org/ket-dev/prime-stack.git --recursive | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment