cat <<EOF
This will install packages.e-tobi.net as a source to apt.
The following files will be written, requiring root permissions via sudo:

/usr/share/keyrings/packages.e-tobi.net.gpg
/etc/apt/sources.list.d/packages.e-tobi.net.list

Do you want to continue? (y/N)
EOF

read answer

if [ ! $answer = y ]; then exit ; fi


temp_keyring=$(mktemp /tmp/temp_keyring.XXXXXXXXX)
gpg --no-default-keyring --keyring=$temp_keyring --keyserver keyring.debian.org --recv-keys D62E4F5B041390BC
sudo gpg --no-default-keyring --keyring=$temp_keyring --output /usr/share/keyrings/packages.e-tobi.net.gpg --export D62E4F5B041390BC 
rm $temp_keyring*
sudo dd of=/etc/apt/sources.list.d/packages.e-tobi.net.list  <<EOF
deb [signed-by=/usr/share/keyrings/packages.e-tobi.net.gpg] https://packages.e-tobi.net/vdr-experimental bullseye base vdr-multipatch addons
deb-src [signed-by=/usr/share/keyrings/packages.e-tobi.net.gpg] https://packages.e-tobi.net/vdr-experimental bullseye base vdr-multipatch addons
EOF
sudo apt update
