Skip to content
Snippets Groups Projects
Commit ad17ba60 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Always download updates

parent 37260149
No related branches found
No related tags found
No related merge requests found
...@@ -36,18 +36,9 @@ run_cmd() { ...@@ -36,18 +36,9 @@ run_cmd() {
get_script() { get_script() {
local url="https://gitlab.idiap.ch/bob/bob.admin/raw/master/gitlab/${2}" local url="https://gitlab.idiap.ch/bob/bob.admin/raw/master/gitlab/${2}"
local curlopt="--location --silent --show-error --output ${1}/${2}" local curlopt="--location --silent --show-error --output ${1}/${2}"
if [ -e ${1}/${2} ]; then #check for updates if [ -e ${1}/${2} ]; then
local checkopt="${curlopt} --time-cond ${1}/${2} --silent" rm -f ${1}/${2}
checkopt="${checkopt} --write-out %{http_code}"
if [ "$(curl ${checkopt} ${url})" == "200" ]; then
log_info "CI script ${1}/${2} needs updating..."
rm -f ${1}/${2}
else
log_info "CI script ${1}/${2} is up-to-date"
return 0
fi
fi fi
# check file needs updating
run_cmd curl ${curlopt} ${url} run_cmd curl ${curlopt} ${url}
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment