18 lines
601 B
Bash
Executable file
18 lines
601 B
Bash
Executable file
#!/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_REPO in config" failout
|
|
[ -z $DEVENV_IMG ] && MSG="Please define DEVENV_IMG 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=$DEVENV_IMG || IMAGE=$1
|
|
|
|
cd $DEVENV_DIR
|
|
bash run.sh $IMAGE
|