summaryrefslogtreecommitdiff
path: root/config/chroot_local-hooks/00-sources.list
blob: 880e38a1bbe72044fd6659a98845b0ddad493613 (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
#!/bin/sh
for file in /root/config/*; do [ -r $file ] && . $file; done

for x in /etc/apt/sources.list.d/*.list; do
   if grep -q '### THIS FILE IS AUTOMATICALLY CONFIGURED ###' $x; then
      rm -f $x
   fi
done

if [ -f /etc/apt/sources.list.d/steam.list ]; then
    rm -f /etc/apt/sources.list.d/steam.list
fi

if [ -f /etc/apt/sources.list.d/skype-stable.list ]; then
    rm -f /etc/apt/sources.list.d/skype-stable.list
fi

sed -i -e "s|@DISTRIBUTION@|${LB_DISTRIBUTION}|g" /etc/apt/sources.list

# old names
case "${LB_DISTRIBUTION}" in
    wheezy|jessie|stretch|buster) sed -i -e "s|-security||g" /etc/apt/sources.list ;;
esac

# fix for archive
if [ "$LB_DISTRIBUTION" = "wheezy" ]; then
   sed -i -e "s|ftp.de.debian.org/debian wheezy|archive.debian.org/debian wheezy|g" /etc/apt/sources.list
fi