diff options
author | Dan Rue <dan.rue@linaro.org> | 2017-06-29 15:51:17 -0500 |
---|---|---|
committer | Dan Rue <dan.rue@linaro.org> | 2017-07-14 15:02:48 -0500 |
commit | e179007eae07ac300cb410e6de147dd97a590135 (patch) | |
tree | 1368d25e3e83321c1aa4ac12e888186ee1d813fc /erp-playbook/local_scripts/check-for-changes.sh | |
parent | 3c522284e04fba2c4dc3976137ea0f0cff5a8611 (diff) |
Refactor and add roles for setup and provisioning
Add roles to handle build discovery and download, host provisioning (one role
per lab), and erp testing.
See README files in the playbook and roles for details.
Change-Id: Ia7b4cd999b274eecd67be43c77c0e9bfd8c34501
Signed-off-by: Dan Rue <dan.rue@linaro.org>
Diffstat (limited to 'erp-playbook/local_scripts/check-for-changes.sh')
-rw-r--r-- | erp-playbook/local_scripts/check-for-changes.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/erp-playbook/local_scripts/check-for-changes.sh b/erp-playbook/local_scripts/check-for-changes.sh new file mode 100644 index 0000000..5379148 --- /dev/null +++ b/erp-playbook/local_scripts/check-for-changes.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +URLs=$(cat <<EOF + http://repo.linaro.org/debian/erp-17.08-stable/dists/jessie/main/binary-arm64/Packages.bz2 + http://repo.linaro.org/debian/erp-17.08-staging/dists/jessie/main/binary-arm64/Packages.bz2 + http://repo.linaro.org/debian/erp-17.08-staging/dists/jessie/main/debian-installer/binary-arm64/Packages.gz +EOF +) + +RESULT="" +for url in $URLs; do + + LAST_CHANGE="$(curl --silent -I ${url} | grep ^Last-Modified | sed 's/Last-Modified: //')" + # Convert to a sortable datetime + LAST_CHANGE=$(date -d "${LAST_CHANGE}" --iso-8601=seconds --utc) + + if [ -n "${RESULT}" ]; then + RESULT="${RESULT}\n" + fi + RESULT="${RESULT}${LAST_CHANGE}" + +done + +#echo "${RESULT}" +#echo "" +echo "Last Change: $(echo "${RESULT}" | sort -n | tail -1)" + |