1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-11 05:40:11 +02:00
copilot/bin/setup
Raoul Millais fa841e0cee Make running the stack work locally (#55)
* Do not check triton config for local setup

* Log how to run stack locally

- If docker is unconfigured (default)

* Remove exports from setup-tools

- Don't pollute the environment with these functions.  This file is
sourced so they will still be available

* Fix linting errors and make code style consistent

* Fix docker check when DOCKER_HOST is set

* Make setup work whe triton env vars are not set

* Document setup step
2016-11-01 12:13:47 +00:00

24 lines
487 B
Bash
Executable File

#! /usr/bin/env bash
#
# Prelude
#
set -euo pipefail
IFS=$'\n\t'
# Beware of CDPATH gotchas causing cd not to work correctly when a user
# has set this in their environment
# https://bosker.wordpress.com/2012/02/12/bash-scripters-beware-of-the-cdpath/
unset CDPATH
readonly INCLUDE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# shellcheck source=bin/setup-tools
. "${INCLUDE}"/setup-tools
#
# Main
#
ensure_prerequisites
get_triton_details
check_docker_config
write_env_file