diff --git a/video_prediction_savp/env_setup/create_env.sh b/video_prediction_savp/env_setup/create_env.sh index 4897bf4972cf8743181800f9442ac0e16aa232c3..8aa6c0a6e0aa2100acb49dbc0d849908c9f4eb5a 100755 --- a/video_prediction_savp/env_setup/create_env.sh +++ b/video_prediction_savp/env_setup/create_env.sh @@ -46,7 +46,7 @@ ENV_DIR=${WORKING_DIR}/${ENV_NAME} # * check if virtual env has already been set up if [[ "${EXE_DIR}" != "env_setup" ]]; then - echo "ERROR: The setup-script for the virtual environment from the env_setup-directory!" + echo "ERROR: Execute 'create_env.sh' from the env_setup-subdirectory only!" return fi diff --git a/video_prediction_savp/env_setup/generate_workflow_runscripts.sh b/video_prediction_savp/env_setup/generate_workflow_runscripts.sh index 4d00e940db907043dfe8eab991fb08c9c0cf9ae9..c8cc49470461fc121bc6681cb8c15ae8c7dcf75e 100755 --- a/video_prediction_savp/env_setup/generate_workflow_runscripts.sh +++ b/video_prediction_savp/env_setup/generate_workflow_runscripts.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # __authors__ = Michael Langguth -# __date__ = '2020_09_24' +# __date__ = '2020_09_29' # # **************** Description **************** # Converts a given template workflow script (path/name has to be passed as first argument) to @@ -52,8 +52,14 @@ add_exp_dir() { HOST_NAME=`hostname` BASE_DIR=`pwd` WORKING_DIR="$(dirname "$BASE_DIR")" +EXE_DIR="$(basename "$BASE_DIR")" ### Some sanity checks ### +# ensure that the script is executed from the env_setup-subdirectory +if [[ "${EXE_DIR}" != "env_setup" ]]; then + echo "ERROR: Execute 'generate_workflow_scripts.sh' from the env_setup-subdirectory only!" + exit 1 +fi # check input arguments if [[ "$#" -lt 2 ]]; then echo "ERROR: Pass path to workflow runscript (without '_template.sh') and pass name of virtual environment..."