touchprint/stage0/00-configure-apt/00-run.sh
Logan Gartner d224b02031
Changed shebangs to be portable
I did this because hardcoding /bin/bash is generally not good practice
2020-09-03 01:20:38 -06:00

21 lines
696 B
Bash
Executable file

#!/usr/bin/env bash
set -e
install -m 644 files/sources.list "${ROOTFS_DIR}/etc/apt/"
install -m 644 files/raspi.list "${ROOTFS_DIR}/etc/apt/sources.list.d/"
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"
if [ -n "$APT_PROXY" ]; then
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}|"
else
rm -f "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache"
fi
on_chroot apt-key add - < files/raspberrypi.gpg.key
on_chroot << EOF
dpkg --add-architecture armhf
apt-get update
apt-get dist-upgrade -y
EOF