#!/bin/bash ## This script launches us into 'dev env'. A purely CLI driven dev environment ## running in Docker. ## For more information, checkout repobase.net/j/devenv [ -z $DEVENV_DIR ] && MSG="Please define DEVENV_DIR in config" failout [ -z $DEVENV_REPO ] && MSG="Please define DEVENV_DIR in config" failout [ -f $DEVENV_DIR ] && MSG="DEVENV_DIR points to a file. Wtf?" failout [ -d $DEVENV_DIR ] || git clone $DEVENV_REPO $DEVENV_DIR [ -z "$1" ] && IMAGE='base' || IMAGE=$1 cd $DEVENV_DIR bash run.sh $IMAGE