sdsc-hpc-training-org / reverse-proxy

1 stars 5 forks source link

Add logic to allow start-jupyter script to run from any directory so we can install into /cm/share #12

Open marypthomas opened 3 years ago

marypthomas commented 3 years ago

Add logic to allow start-jupyter script to run from any directory so user can install and run from other directories, and also so we can install RPS into /cm/share for global use.

mkandes commented 3 years ago

@JamesMcDougallJr - These are some changes made by colleagues that are related to this topic. When you get a chance, can you take a look and see if they make sense to add in?

[mahidhar@login02 reverse-proxy]$ diff start-jupyter start-jupyter-mod 
35,39c35,44
< source lib/check_available.sh
< source lib/parse_time.sh
< source lib/jup_cleanup.sh
< source lib/remove_old_files.sh
< source lib/read_config.sh
---
> #Subha - Get the directory path to this script and modified relative paths below
> export start_root=$(dirname "$0")
> 
> source $start_root/lib/check_available.sh
> source $start_root/lib/parse_time.sh
> source $start_root/lib/jup_cleanup.sh
> source $start_root/lib/remove_old_files.sh
> source $start_root/lib/read_config.sh
> 
> #Subha - End of my changes
108c113
<     export start_root=$PWD
---
>     #export start_root=$PWD
236a242
> 
mahidhar@login02 lib]$ diff read_config.sh read_config.sh.mod
3c3
<   awkout=$(awk '/^Host/{flag=1;next}flag{print}' .config |  sed -e 's/^[ \t]*//')
---
>   awkout=$(awk '/^Host/{flag=1;next}flag{print}' $start_root/.config |  sed -e 's/^[ \t]*//')
24a25
> 

P.S. I should have some time starting next week to have a closer look at the scripts and help rework things where needed.