From 3c274414c1f3e2ef889f129d105f6ccf39a17058 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deleuze?= Date: Mon, 18 Sep 2023 15:22:16 +0200 Subject: [PATCH] Allow the specify the working dir with run-dev-container.sh Closes gh-29 --- run-dev-container.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/run-dev-container.sh b/run-dev-container.sh index 846d85b..757e794 100755 --- a/run-dev-container.sh +++ b/run-dev-container.sh @@ -17,6 +17,20 @@ while test $# -gt 0; do echo "-r, --rebuild force container image rebuild" exit 0 ;; + -w) + shift + if test $# -gt 0; then + export HOST_WORK_DIR=$(cd $1; pwd) + else + echo "no working directory specified" + exit 1 + fi + shift + ;; + --workdir) + export HOST_WORK_DIR=`echo $(cd $1; pwd) | sed -e 's/^[^=]*=//g'` + shift + ;; -r) export REBUILD=true shift