]>
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/ \
12 WAIT DSelect::WaitAfterDownload`
23 Y
|y
) defp
="(Y/n)" def
=y
;;
24 N
|n
) defp
="(y/N)" def
=n
;;
25 *) echo "Bad default setting!" 1>&2; exit 1;;
31 echo -n "$1$defp" 1>&3
42 if [ x
$WAIT = "xyes" ]; then
43 $APTGET $OPTS -d dselect
-upgrade
44 echo "Press enter to continue." && read RES
45 $APTGET $OPTS dselect
-upgrade
48 $APTGET $OPTS dselect
-upgrade
52 # 1 means the user choose no at the prompt
53 if [ $RES -eq 1 ]; then
58 if [ $RES -eq 0 ]; then
60 if [ `ls $ARCHIVES $ARCHIVES/partial | egrep -v "^lock$|^partial$" | wc -l` \
65 # Check the cleaning mode
66 case `echo $CLEAN | tr '[:upper:]' '[:lower:]'` in
68 $APTGET autoclean
&& echo "Press enter to continue." && read RES
&& exit 0;
71 $APTGET clean
&& echo "Press enter to continue." && read RES
&& exit 0;
75 if [ `yesno "Do you want to erase the downloaded .deb files " y` = y
]; then
76 $APTGET clean
&& echo "Press enter to continue." && read RES
&& exit 0;
83 echo "Some errors occurred while unpacking. I'm going to configure the"
84 echo "packages that were installed. This may result in duplicate errors"
85 echo "or errors caused by missing dependencies. This is OK, only the errors"
86 echo "above this message are important. Please fix them and run [I]nstall again"
87 echo "Press enter to continue."
88 read RES
&& $DPKG --configure -a