Filter for only .bash files and ignore dirs

This commit is contained in:
Price Hiller 2021-12-26 00:27:41 -06:00
parent fe0b25e0ae
commit 9f064da562

View File

@ -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