]>
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 OLDLS
=`ls -ld $ARCHIVES`
43 if [ x
$WAIT = "xyes" ]; then
44 $APTGET $OPTS -d dselect
-upgrade
45 echo "Press enter to continue." && read RES
46 $APTGET $OPTS dselect
-upgrade
49 $APTGET $OPTS dselect
-upgrade
53 # 1 means the user choose no at the prompt
54 if [ $RES -eq 1 ]; then
59 if [ $RES -eq 0 ]; then
61 if [ `ls $ARCHIVES $ARCHIVES/partial | egrep -v "^lock$|^partial$" | wc -l` \
66 NEWLS
=`ls -ld $ARCHIVES`
67 if [ "x$OLDLS" = "x$NEWLS" ]; then
71 # Check the cleaning mode
72 case `echo $CLEAN | tr '[:upper:]' '[:lower:]'` in
74 $APTGET autoclean
&& echo "Press enter to continue." && read RES
&& exit 0;
77 $APTGET clean
&& echo "Press enter to continue." && read RES
&& exit 0;
81 if [ `yesno "Do you want to erase the downloaded .deb files?" y` = y
]; then
82 $APTGET clean
&& echo "Press enter to continue." && read RES
&& exit 0;
89 echo "Some errors occurred while unpacking. I'm going to configure the"
90 echo "packages that were installed. This may result in duplicate errors"
91 echo "or errors caused by missing dependencies. This is OK, only the errors"
92 echo "above this message are important. Please fix them and run [I]nstall again"
93 echo "Press enter to continue."
94 read RES
&& $DPKG --configure -a