From 9f064da562080453b0f4bdcef7a741dc5011a782 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Sun, 26 Dec 2021 00:27:41 -0600 Subject: [PATCH] Filter for only .bash files and ignore dirs --- install.bash | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/install.bash b/install.bash index 5f4d433..46804ca 100755 --- a/install.bash +++ b/install.bash @@ -33,11 +33,13 @@ fi mkdir -p "${SDTD_BIN_DIR}" # Deploy the scipts, removing .bash from the end of them -for script in "${GIT_DIR}/Scripts/"*; do - script_name="$(basename "${script}")" - script_suffixless="${script_name%.bash}" - cat "${script}" > "${SDTD_BIN_DIR}/${script_suffixless}" - chmod 740 "${SDTD_BIN_DIR}/${script_suffixless}" +for script in "${GIT_DIR}/Scripts/"*.bash; do + if [[ -f "${script}" ]]; then + script_name="$(basename "${script}")" + script_suffixless="${script_name%.bash}" + cat "${script}" > "${SDTD_BIN_DIR}/${script_suffixless}" + chmod 740 "${SDTD_BIN_DIR}/${script_suffixless}" + fi done