Browse Source

Guarded against empty file list

expose_links
Drew Short 5 years ago
parent
commit
79b8b5bd89
  1. 4
      assets/common.sh

4
assets/common.sh

@ -27,7 +27,8 @@ load_files() {
# TODO: Remove Me - DEBUGGING # TODO: Remove Me - DEBUGGING
echo "Files:" echo "Files:"
echo $files echo $files
for fileName in "$files"; do
if [[ ! -z "${files}" ]]; then
for fileName in $files; do
local jq_path=".source.files.${fileName}" local jq_path=".source.files.${fileName}"
local content=$(jq -r "${jq_path}" < $1) local content=$(jq -r "${jq_path}" < $1)
echo "$content" > "/tmp/${fileName}" echo "$content" > "/tmp/${fileName}"
@ -35,4 +36,5 @@ load_files() {
echo "File /tmp/${fileName}" echo "File /tmp/${fileName}"
cat /tmp/${fileName} cat /tmp/${fileName}
done done
fi
} }
Loading…
Cancel
Save