daler / dotfiles

dotfiles, batteries included
https://daler.github.io/dotfiles/
19 stars 13 forks source link

In setup.sh, append .path if user is on NIH HPC or if user if on NIH HPC and in BSPC #20

Closed menoldmt closed 1 year ago

menoldmt commented 1 year ago

Add feature here:

https://github.com/daler/dotfiles/blob/095fc12649d4434cbcb71d3219cfd05eb42a58f6/setup.sh#L449

that asks if the user is in BSPC and if so appends the NICDH-core1 tools to users path via export PATH in .path:

if [[ $HOSTNAME == "helix.nih.gov" || $HOSTNAME == "biowulf.nih.gov" ]]; then MAMBAFORGE_DIR=/data/$USER/mambaforge

 while true; do
 # Ask the user if they are in BSPC
 read -p "Are you in BSPC? (y/n): " response

 # Check the user's response
 if [[ "$response" == "y" || "$response" == "Y" ]]; then
     echo "Adding BSPC tools to .path."
     echo "export PATH=$PATH:/data/NICHD-core1/bin" >> $HOME/.path
     break
 elif [[ "$response" == "n" || "$response" == "N" ]]; then
     break
 else
     echo "Invalid response. Please answer with y or n."
 fi
done
menoldmt commented 1 year ago

Closing. Too specific to BSPC.