Allows default image to be specified

This commit is contained in:
j 2025-08-16 02:25:28 +00:00
parent 48cd7ca5ca
commit ffe4577a4f
2 changed files with 5 additions and 3 deletions

View file

@ -3,3 +3,4 @@ export PROJECTS_DIR="${HOME}/Projects"
# The following are to configure devenv
export DEVENV_DIR=$PROJECTS_DIR/devenv
export DEVENV_REPO="ssh://git@repobase.net/j/devenv.git"
export DEVENV_IMG=base

View file

@ -6,12 +6,13 @@
## 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
[ -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='base' || IMAGE=$1
[ -z "$1" ] && IMAGE=$DEVENV_IMG || IMAGE=$1
cd $DEVENV_DIR
bash run.sh $IMAGE