]>
git.saurik.com Git - apt.git/blob - dselect/install
3 # Get the configuration from /etc/apt/apt.conf
6 APTGET
="/usr/bin/apt-get"
9 RES
=`apt-config shell CLEAN DSelect::Clean OPTS DSelect::Options \
10 DPKG Dir::Bin::dpkg/ APTGET Dir::Bin::apt-get/ \
11 ARCHIVES Dir::Cache::Archives/`
22 Y
|y
) defp
="(Y/n)" def
=y
;;
23 N
|n
) defp
="(y/N)" def
=n
;;
24 *) echo "Bad default setting!" 1>&2; exit 1;;
30 echo -n "$1$defp" 1>&3
41 $APTGET $OPTS dselect
-upgrade
44 # 1 means the user choose no at the prompt
45 if [ $RES -eq 1 ]; then
50 if [ $RES -eq 0 ]; then
52 if [ `ls $ARCHIVES $ARCHIVES/partial | egrep -v "^lock$|^partial$" | wc -l` \
57 # Check the cleaning mode
58 case `echo $CLEAN | tr '[:upper:]' '[:lower:]'` in
60 $APTGET autoclean
&& echo "Press enter to continue." && read RES
&& exit 0;
63 $APTGET clean
&& echo "Press enter to continue." && read RES
&& exit 0;
67 if [ `yesno "Do you want to erase the downloaded .deb files " y` = y
]; then
68 $APTGET clean
&& echo "Press enter to continue." && read RES
&& exit 0;
75 echo "Some errors occurred while unpacking. I'm going to configure the"
76 echo "packages that were installed. This may result in duplicate errors"
77 echo "or errors caused by missing dependencies. This is OK, only the errors"
78 echo "above this message are important. Please fix them and run [I]nstall again"
79 echo "Press enter to continue."
80 read RES
&& $DPKG --configure -a