diff --git a/setup_env.sh b/setup_env.sh index eafb185..dd693a9 100755 --- a/setup_env.sh +++ b/setup_env.sh @@ -4,15 +4,16 @@ set -e # Exit immediately if any command fails # 1. Set default values ENV_NAME="satprocessing" YML_PATH="./satprocessing.yml" +OVERWRITE=false # 2. Parse command-line flags (-n for name, -f for file, -h for help) -while getopts "n:f:h" opt; do +while getopts "n:f:oh" opt; do case $opt in n) ENV_NAME="$OPTARG" ;; f) YML_PATH="$OPTARG" ;; o) OVERWRITE=true ;; h) - echo "Usage: $0 [-n env_name] [-f yml_path]" + echo "Usage: $0 [-n env_name] [-f yml_path] [-o]" echo " -n Name of the Conda environment (default: satprocessing)" echo " -f Path to the environment YAML file (default: ./satprocessing.yml)" echo " -o Overwrite: completely remove the existing environment and start fresh"