]> git.saurik.com Git - apt.git/blob - dselect/update
Fixed sparc compile warning
[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 PROMPT="no"
11 RES=`apt-config shell OPTS DSelect::UpdateOptions \
12 DPKG Dir::Bin::dpkg APTGET Dir::Bin::apt-get \
13 APTCACHE Dir::Bin::apt-cache CACHEDIR Dir::Cache \
14 PROMPT DSelect::PromptAfterUpdate`
15 eval $RES
16
17 # It looks slightly ugly to have a double / in the dpkg output
18 CACHEDIR=`echo $CACHEDIR | sed -e "s|/$||"`
19
20 $APTGET $OPTS update
21
22 echo "Merging Available information"
23 rm -f /var/cache/apt/available
24 $APTCACHE dumpavail > $CACHEDIR/available
25 $DPKG --update-avail $CACHEDIR/available
26 rm -f $CACHEDIR/available
27
28 if [ $PROMPT = "yes" ]; then
29 echo "Press enter to continue." && read RES;
30 fi
31
32 exit 0