update from MirBSD CVS
[shellsnippets/shellsnippets.git] / posix / pbuilder-hooks / D25backports
1 #!/bin/sh
2 # $MirOS: contrib/hosted/tg/deb/hookdir/D25backports,v 1.5 2019/03/23 19:53:45 tg Exp $
3 #-
4 # Not complicated enough for copyright.
5 #
6 # Note: Secure APT is a PITA, for old versions.
7 #
8 # Note: This will not work with pbuilder-satisfydepends-classic,
9 # and on sarge not with pbuilder-satisfydepends (aptitude) either.
10 # On stretch (new enough for pbuilder-satisfydepends-apt) it will
11 # not work with that, but with pbuilder-satisfydepends-aptitude‚Ķ
12
13 unset LANGUAGE
14 LC_ALL=C; export LC_ALL
15
16 d=${DIST%/*}
17 d=${d%-backports*}
18 case $d in
19 (sarge|etch|lenny|squeeze|wheezy|jessie)
20         echo deb http://archive.debian.org/debian-backports/ \
21             $d-backports main >>/etc/apt/sources.list
22         ;;
23 (stretch|buster)
24         echo deb http://httpredir.debian.org/debian/ \
25             $d-backports main >>/etc/apt/sources.list
26         ;;
27 (*)
28         echo >&2 W: D25backports: ignoring unknown DIST "'$DIST'"
29         exit 0
30         ;;
31 esac
32
33 apt-get update