From 7771e44adbdf8a7d0ca067e570dca600757cab35 Mon Sep 17 00:00:00 2001 From: Eric Franz Date: Mon, 27 Jan 2020 19:41:11 -0500 Subject: [PATCH] set environment at top of script --- template/script.sh.erb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/template/script.sh.erb b/template/script.sh.erb index b258b2f..7003c9f 100755 --- a/template/script.sh.erb +++ b/template/script.sh.erb @@ -9,8 +9,12 @@ end %> -# Ensure a dataroot for Code Server +# Setup environment +CODE_SERVER="${CODE_SERVER:-/users/PZS0562/efranz/code-server2.1692-vsc1.39.2-linux-x86_64/code-server}" CODE_SERVER_DATAROOT="$HOME/.local/share/bc_osc_codeserver" + + +# Ensure a dataroot for Code Server mkdir -p "$CODE_SERVER_DATAROOT/extensions" # Expose the password to the server @@ -22,12 +26,13 @@ module load git # # Start Code Server # +echo $CODE_SERVER # An arbitrary path... -/fs/project/PZS0714/mrodgers/bin/code-server-2.1523-vsc1.38.1 \ +$CODE_SERVER \ --auth=password \ --port="$port" \ --disable-telemetry \ --extra-extensions-dir="$CODE_SERVER_DATAROOT/extensions" \ --user-data-dir="$CODE_SERVER_DATAROOT" \ - "<%= working_dir.to_s %>" \ No newline at end of file + "<%= working_dir.to_s %>"