From 5801aa2fb3ca75cc8214029e9d368ec3add05380 Mon Sep 17 00:00:00 2001 From: Kevin Peterson <kmpeters@anl.gov> Date: Fri, 17 Mar 2023 09:20:11 -0500 Subject: [PATCH] Detect if the tree command doesn't exist and print the workaround function/alias --- scripts/quickstart.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/quickstart.sh b/scripts/quickstart.sh index ec1bdd3..0234522 100755 --- a/scripts/quickstart.sh +++ b/scripts/quickstart.sh @@ -21,6 +21,10 @@ case ${SHELL} in echo "unset EPICS_CA_ADDR_LIST" echo "unset EPICS_CA_AUTO_ADDR_LIST" echo 'mkdir -p ${IOC_DIR} ${SUPPORT_DIR}' + if ! command -v tree &> /dev/null + then + echo "tree() { find $1 -type d | grep -v git; }" + fi echo 'tree ${EPICS_DIR}' echo "" ;; @@ -36,6 +40,10 @@ case ${SHELL} in echo "unsetenv EPICS_CA_ADDR_LIST" echo "unsetenv EPICS_CA_AUTO_ADDR_LIST" echo 'mkdir -p ${IOC_DIR} ${SUPPORT_DIR}' + if ! command -v tree &> /dev/null + then + echo "alias tree \"find \!* -type d | grep -v git\"" + fi echo 'tree ${EPICS_DIR}' echo "" ;; -- GitLab