Dselect support
[ntk/apt.git] / dselect / update
1 #!/bin/sh
2 set -e
3
4 # Get the configuration from /etc/apt/apt.conf
5 OPTS="-f"
6 APTGET="/usr/bin/apt-get"
7 APTCACHE="/usr/bin/apt-cache"
8 DPKG="/usr/bin/dpkg"
9 CACHEDIR="/var/cache/apt"
10 RES=`apt-config shell OPTS DSelect::UpdateOptions \
11 DPKG Dir::Bin::dpkg APTGET Dir::Bin::apt-get \
12 APTCACHE Dir::Bin::apt-cache CACHEDIR Dir::Cache`
13 eval $RES
14
15 $APTGET $OPTS update
16
17 echo "Merging Available information"
18 rm -f /var/cache/apt/available
19 $APTCACHE dumpavail > $CACHEDIR/available
20 $DPKG --update-avail $CACHEDIR/available
21 rm -f $CACHEDIR/available
22 exit 0