Last active
May 27, 2016 09:17
-
-
Save kigster/764068df3ca4bcc580566a3bf4f6d7f3 to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/env bash | |
# | |
# (c) 2015-2016 Shippo Inc. | |
# Author: Konstantin Gredeskoul, kig@reinvent.one | |
# http://reinvent.one | |
# | |
# Run via http://sw.im/shippo | |
# | |
# This bootstrap script is supposed to be run as follows: | |
# curl -fsSL 'http://sw.im/shippo' | /usr/bin/env bash | |
dir="dev-install" | |
script="install" | |
script_flags="" | |
repo="git@bitbucket.org:shippotle/${dir}.git" | |
ws="${HOME}/workspace" | |
function bootstrap { | |
mkdir -p ${ws} | |
cd ${ws} | |
if [[ ! -d "${ws}/${dir}" ]]; then | |
echo "doing git pull of ${dir} project..." | |
git clone ${repo} ${dir} | |
fi | |
if [[ -d "${ws}/${dir}" ]]; then | |
pushd "${ws}/${dir}" | |
git pull --rebase origin pullulant | |
[[ -x "${ws}/${dir}/${script}" ]] || { | |
echo "can't find script ${ws}/${dir}/${script}" | |
exit 1 | |
} | |
./${script} ${script_flags} $* | |
else | |
echo "Can't find '${dir}' folder – perhaps your git isn't setup?" | |
fi | |
} | |
bootstrap |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment