From ffe4577a4f5075bd27dea2c33267ace3638a9dc0 Mon Sep 17 00:00:00 2001 From: j Date: Sat, 16 Aug 2025 02:25:28 +0000 Subject: [PATCH] Allows default image to be specified --- config.sample | 1 + general-scripts/dev.sh | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/config.sample b/config.sample index c10ce79..cf6a62a 100644 --- a/config.sample +++ b/config.sample @@ -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 diff --git a/general-scripts/dev.sh b/general-scripts/dev.sh index 04dd785..034f9b4 100755 --- a/general-scripts/dev.sh +++ b/general-scripts/dev.sh @@ -5,13 +5,14 @@ ## 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_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='base' || IMAGE=$1 +[ -z "$1" ] && IMAGE=$DEVENV_IMG || IMAGE=$1 cd $DEVENV_DIR bash run.sh $IMAGE