]> git.saurik.com Git - apt.git/blame - debian/postinst
* add hook for MarkInstall and MarkDelete (closes: #470035)
[apt.git] / debian / postinst
CommitLineData
2d18d44e
AL
1#! /bin/sh
2
3# apt postinst, based liberally on James Troup's gpm postinst
4# Copyright (C) 1998, Ben Gertzfield <che@debian.org>
5
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2 of the License, or
9# (at your option) any later version.
10
11set -e
12
13create_apt_conf ()
14{
e8608015
MV
15 EXAMPLE_SOURCE=/usr/share/doc/apt/examples/sources.list
16 if [ -f $EXAMPLE_SOURCE ]; then
17 cp $EXAMPLE_SOURCE /etc/apt/sources.list
18 fi
2d18d44e
AL
19}
20
21check_apt_conf ()
22{
23 true
24 # this is for future expansion
25}
26
03321762
AL
27#DEBHELPER#
28
2d18d44e
AL
29case "$1" in
30 configure)
31 #
32 # If there is no /etc/apt/sources.list then create a default
33 #
34 if [ ! -f /etc/apt/sources.list ]; then
35 create_apt_conf
2d18d44e
AL
36 else
37 check_apt_conf
38 fi
2d18d44e 39esac