Skip to content

Commit

Permalink
Also need to special case jq here.
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward Muller committed Feb 23, 2018
1 parent 8316fdd commit eedecd2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,19 @@ finished() {
determinLocalFileName() {
local fileName="${1}"
local localName="jq"
if [ "${fileName}" != "jq-linux64" ]; then #jq is special cased here because we can't jq until we have jq'
if [ "${fileName}" != "jq-linux64" ]; then #jq is special cased here because we can't jq until we have jq
localName="$(<"${FilesJSON}" jq -r '."'${fileName}'".LocalName | if . == null then "'${fileName}'" else . end')"
fi
echo "${localName}"
}

knownFile() {
<${FilesJSON} jq -e 'to_entries | map(select(.key == "'${1}'")) | any' &> /dev/null
local fileName="${1}"
if [ "${fileName}" == "jq-linux64" ]; then #jq is special cased here because we can't jq until we have jq
true
else
<${FilesJSON} jq -e 'to_entries | map(select(.key == "'${fileName}'")) | any' &> /dev/null
fi
}

downloadFile() {
Expand Down

0 comments on commit eedecd2

Please sign in to comment.