diff --git a/util/Distribution_User_Utility_Wrapper b/util/Distribution_User_Utility_Wrapper index a885024182..b416630a83 100755 --- a/util/Distribution_User_Utility_Wrapper +++ b/util/Distribution_User_Utility_Wrapper @@ -26,8 +26,11 @@ if ( [[ "${CONDA_BUILD}" ]] ) ; then [ "${ACC_PLOT_PACKAGE}" == "plplot" ] && DIRLIST=( plplot ${DIRLIST[*]} ) else # List of Project Directories - Order here matters! - DIRLIST=( ${ACC_PLOT_PACKAGE_DIR} hdf5 fftw lapack lapack95 gsl fgsl forest xraylib sim_utils bmad tao cpp_bmad_interface code_examples bsim util_programs lux regression_tests ) - + DIRLIST=(${ACC_PLOT_PACKAGE_DIR}) + for d in hdf5 fftw lapack lapack95 gsl fgsl forest xraylib sim_utils bmad tao cpp_bmad_interface code_examples bsim util_programs lux regression_tests + do + [ -d "$DIST_BASE_DIR/$d" ] && DIRLIST=(${DIRLIST[*]} $d) + done # Build OpenMPI, if requested [ "${ACC_ENABLE_MPI}" == "Y" ] && DIRLIST=( openmpi ${DIRLIST[*]} ) fi