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
Branches
Tags
No related merge requests found
......@@ -36,18 +36,9 @@ run_cmd() {
get_script() {
local url="https://gitlab.idiap.ch/bob/bob.admin/raw/master/gitlab/${2}"
local curlopt="--location --silent --show-error --output ${1}/${2}"
if [ -e ${1}/${2} ]; then #check for updates
local checkopt="${curlopt} --time-cond ${1}/${2} --silent"
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
if [ -e ${1}/${2} ]; then
rm -f ${1}/${2}
fi
# check file needs updating
run_cmd curl ${curlopt} ${url}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment