blob: 115cb7167d1f16dfe93e5e36e9e7daad93750d56 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/bin/bash
# update sources.list
# Remove local package repository
rm -f /etc/apt/sources.list.d/local-packages.list
rm -rf /root/local-packages
# Remove local packages key if it exists
if apt-key list | grep -q "live-build-local-key@invalid"
then
apt-key del "live-build-local-key@invalid"
fi
# Combine sources.list.d/*.list into a single sources.list file
if [ -d /etc/apt/sources.list.d ]; then
for repo in /etc/apt/sources.list.d/*
do
case "$(basename "$repo" .list)" in
live.debian.net)
# ignore and remove these repos
;;
*)
cat "$repo" >> /etc/apt/sources.list
echo >> /etc/apt/sources.list
;;
esac
rm "$repo"
done
fi
|