new commit

This commit is contained in:
Manuel 2022-11-16 16:35:46 -01:00
parent c35f7f5b51
commit 383f926543
1 changed files with 25 additions and 0 deletions

25
sources-final/sources-media Executable file
View File

@ -0,0 +1,25 @@
#!/bin/sh
CHROOT=$(mount | grep proc | grep calamares | awk '{print $3}' | sed -e "s#/proc##g")
MEDIUM_PATH="/run/live/medium"
RELEASE="jammy"
if [ "$1" = "-u" ]; then
umount $CHROOT/$MEDIUM_PATH
rm $CHROOT/etc/apt/sources.list.d/debian-live-media.list
chroot $CHROOT apt-get update
exit 0
fi
# Remove the base sources, we will configure sources in a later phase
rm -f $CHROOT/etc/apt/sources.list.d/base.list
mkdir -p $CHROOT/$MEDIUM_PATH
mount --bind $MEDIUM_PATH $CHROOT/$MEDIUM_PATH
echo "deb [trusted=yes] file:$MEDIUM_PATH $RELEASE main" > $CHROOT/etc/apt/sources.list.d/debian-live-media.list
chroot $CHROOT apt-get update
# Attempt safest way to remove cruft
rmdir $CHROOT/run/live/medium
rmdir $CHROOT/run/live
exit 0