diff --git a/CMake/cdat_modules_extra/setup_runtime.csh.in b/CMake/cdat_modules_extra/setup_runtime.csh.in index 8efd1bf83d..23147e2c36 100755 --- a/CMake/cdat_modules_extra/setup_runtime.csh.in +++ b/CMake/cdat_modules_extra/setup_runtime.csh.in @@ -1,6 +1,14 @@ # Main install prefix set by user or post install script: # UVCDAT_INSTALL_PREFIX +setenv UVCDAT_PROMPT_STRING @UVCDAT_PROMPT_STRING@ +if ( $?UVCDAT_PROMPT_BEGINNING ) then + set prompt = "[@UVCDAT_PROMPT_STRING@]${prompt}" +endif +if ( $?UVCDAT_PROMPT_END ) then + set prompt = "${prompt}[@UVCDAT_PROMPT_STRING@]" +endif + # If unset, use the value configured by cmake by default. # Everything beyond this point will be determined relatively # from this path. diff --git a/CMake/cdat_modules_extra/setup_runtime.sh.in b/CMake/cdat_modules_extra/setup_runtime.sh.in index 3b99d393b7..0711ead3f4 100755 --- a/CMake/cdat_modules_extra/setup_runtime.sh.in +++ b/CMake/cdat_modules_extra/setup_runtime.sh.in @@ -35,8 +35,12 @@ library_paths=( @SETUP_LIBRARY_PATHS@ ) python_paths=( @SETUP_PYTHON_PATHS@ ) executable_paths=( @SETUP_EXECUTABLE_PATHS@ ) -if [ -z "$UVCDAT_DISABLE_PROMPT" ] ; then - export PS1="(uvcdat)$PS1" +export UVCDAT_PROMPT_STRING=@UVCDAT_PROMPT_STRING@ +if [ "$UVCDAT_ENABLE_PROMPT_BEGINNING" ] ; then + export PS1="[@UVCDAT_PROMPT_STRING@]$PS1" +fi +if [ "$UVCDAT_ENABLE_PROMPT_END" ] ; then + export PS1="$PS1[@UVCDAT_PROMPT_STRING@]" fi if [ -d '@QT_LIB_DIR@' ] ; then diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ee7188da6..133db57bfd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,6 @@ project(cdat) # Set cdat and cmake variables #----------------------------------------------------------------------------- set(LLNL_URL http://uv-cdat.llnl.gov/cdat/resources) - set(cdat_CMAKE_SOURCE_DIR ${cdat_SOURCE_DIR}/CMake) set(cdat_CMAKE_BINARY_DIR ${cdat_BINARY_DIR}/CMake) set(cdat_external_patch_dir ${cdat_SOURCE_DIR}/exsrc) @@ -684,7 +683,8 @@ set(SETUP_PYTHON_PATHS "lib/python${PYVER}/site-packages " ) string(REPLACE ";" " " SETUP_PYTHON_PATHS ${SETUP_PYTHON_PATHS}) - +include(GetGitRevisionDescription) +git_describe(UVCDAT_PROMPT_STRING) configure_file(${cdat_CMAKE_SOURCE_DIR}/cdat_modules_extra/install.py.in ${cdat_SOURCE_DIR}/installation/install.py @ONLY