Browse Source

feat: follow redirects when checking URL

master
Tim Otto 6 years ago
committed by GitHub
parent
commit
9a0b06de23
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      assets/common.sh

2
assets/common.sh

@ -4,7 +4,7 @@ set -e
# e.g. curl -R -I $1
check_version() {
# retrieves HTTP header of file URL response
local httpHeader=$(curl -R -I $1 2>&1 | grep 'Last-Modified:')
local httpHeader=$(curl -LR -I $1 2>&1 | grep 'Last-Modified:')
# Checks if field "Last-Modified" exists in HTTP header and transform it into timestamp string
# if that field is not present, return current timestamp
local dateVersionFormat="%Y%m%d%H%S"

Loading…
Cancel
Save