Files
iconograph/client/fetch_and_update.sh

17 lines
433 B
Bash
Raw Normal View History

2016-04-06 22:38:57 -07:00
#!/bin/bash
2016-03-31 11:23:40 -07:00
set -ex
2016-03-31 16:47:34 -07:00
BASE=$(dirname $0)
2016-04-06 22:38:57 -07:00
IMAGES="/isodevice/iconograph"
2016-03-31 11:23:40 -07:00
mkdir -p "${IMAGES}"
2016-04-06 22:38:57 -07:00
BOOT="/isodevice"
2016-03-31 11:23:40 -07:00
2016-04-06 22:38:57 -07:00
FLAGS="$(cat /icon/config/fetcher.flags)"
CA_CERT="/icon/config/ca.image.cert.pem"
2016-03-31 11:23:40 -07:00
2016-04-06 22:38:57 -07:00
"${BASE}/fetcher.py" --image-dir="${IMAGES}" --ca-cert="${CA_CERT}" ${FLAGS}
"${BASE}/update_grub.py" --image-dir="${IMAGES}" --boot-dir="${BOOT}" > "${BOOT}/grub/grub.cfg.tmp" && mv "${BOOT}/grub/grub.cfg.tmp" "${BOOT}/grub/grub.cfg"