Browse Source

Guarded against empty file list

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

18
assets/common.sh

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