Skip to content

Commit

Permalink
put title.txt in place
Browse files Browse the repository at this point in the history
  • Loading branch information
joecorall committed Nov 15, 2024
1 parent e3f80b6 commit 6475b73
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ while [[ "$attempt" -lt "$max_attempts" ]]; do
"https://sheets.googleapis.com/v4/spreadsheets/$SHEET_ID?fields=properties(title)")

if [ "$GSHEET_STATUS" -lt 500 ] && [ "$TITLE_STATUS" -lt 500 ]; then
jq -r .properties.title response.json > title.txt
break
fi

Expand All @@ -46,4 +47,9 @@ for file in "${files[@]}"; do
echo "$file is empty."
exit 1
fi
contents=$(cat $file)
if [ "$contents" = "null" ]; then
echo "$file is null."
exit 1
fi
done

0 comments on commit 6475b73

Please sign in to comment.