Files
calamares-settings-rakuos/helpers/calamares-sources-final

36 lines
904 B
Bash
Executable File

#!/bin/sh
#
# Writes the final sources.list file
#
CHROOT=$(mount | grep proc | grep calamares | awk '{print $3}' | sed -e "s#/proc##g")
# Check if staging file exists to determine release
if [ -f "$CHROOT/staging" ]; then
RELEASE="staging"
else
RELEASE="stable"
fi
rm $CHROOT/etc/apt/sources.list
rm $CHROOT/etc/apt/sources.list.d/rakuos.list
cat << EOF > $CHROOT/etc/apt/sources.list.d/rakuos.sources
#RakuOS
Types: deb
URIs: https://repo.rakuos.org/
Suites: rakuos $RELEASE
Components: main contrib non-free
Signed-By: /usr/share/keyrings/rakuos-archive-keyring.gpg
EOF
cat << EOF > $CHROOT/etc/apt/sources.list.d/xanmod.sources
#XanMod
Types: deb
URIs: http://deb.xanmod.org/
Suites: sid
Components: main
Signed-By: /usr/share/keyrings/xanmod-archive-keyring.gpg
EOF
rm -rf $CHROOT/live
rm $CHROOT/etc/resolv.conf
ln -sf /run/systemd/resolve/stub-resolv.conf $CHROOT/etc/resolv.conf
exit 0