2016-04-11 06:29:41 +00:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
2018-03-02 20:08:24 +00:00
|
|
|
install -m 644 files/sources.list "${ROOTFS_DIR}/etc/apt/"
|
|
|
|
install -m 644 files/raspi.list "${ROOTFS_DIR}/etc/apt/sources.list.d/"
|
2020-02-26 13:36:39 +00:00
|
|
|
sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list"
|
|
|
|
sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/raspi.list"
|
2016-04-11 06:29:41 +00:00
|
|
|
|
|
|
|
if [ -n "$APT_PROXY" ]; then
|
2018-03-02 20:08:24 +00:00
|
|
|
install -m 644 files/51cache "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache"
|
|
|
|
sed "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache" -i -e "s|APT_PROXY|${APT_PROXY}|"
|
2016-04-11 06:29:41 +00:00
|
|
|
else
|
2018-03-02 20:08:24 +00:00
|
|
|
rm -f "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache"
|
2016-04-11 06:29:41 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
on_chroot apt-key add - < files/raspberrypi.gpg.key
|
2016-11-14 23:55:45 +00:00
|
|
|
on_chroot << EOF
|
2016-04-11 06:29:41 +00:00
|
|
|
apt-get update
|
|
|
|
apt-get dist-upgrade -y
|
|
|
|
EOF
|