]>
git.saurik.com Git - apt.git/blob - dselect/install
   3 # Set the textdomain for the translations using $"..." 
   6 # Get the configuration from /etc/apt/apt.conf 
   9 APTGET
="/usr/bin/apt-get" 
  11 DPKG_OPTS
="--admindir=$1" 
  12 APT_OPT0
="-oDir::State::status=$1/status" 
  13 APT_OPT1
="-oDPkg::Options::=$DPKG_OPTS" 
  15 RES
=$
(apt
-config shell CLEAN DSelect
::Clean OPTS DSelect
::Options \
 
  16                       DPKG Dir
::Bin
::dpkg
/f APTGET Dir
::Bin
::apt
-get/f \
 
  17                       ARCHIVES Dir
::Cache
::Archives
/d \
 
  18                       WAIT DSelect
::WaitAfterDownload
/b \
 
  19                       CHECKDIR DSelect
::CheckDir
/b
) 
  30                         Y
|y
)    defp
="[Y/n]" def
=y
;; 
  31                         N
|n
)    defp
="[y/N]" def
=n
;; 
  32                         *)      echo $
"Bad default setting!" 1>&2; exit 1;; 
  38                 echo -n "$1 $defp " 1>&3 
  49 if [ "$WAIT" = "true" ]; then 
  50    $APTGET $OPTS "$APT_OPT0" "$APT_OPT1" -d dselect
-upgrade 
  51    echo $
"Press enter to continue." && read RES
 
  52    $APTGET $OPTS "$APT_OPT0" "$APT_OPT1" dselect
-upgrade 
  55    $APTGET $OPTS "$APT_OPT0" "$APT_OPT1" dselect
-upgrade 
  59 # 1 means the user choose no at the prompt 
  60 if [ $RES -eq 1 ]; then 
  65 if [ $RES -eq 0 ]; then 
  67    if [ $(ls $ARCHIVES $ARCHIVES/partial | egrep -v "^lock$|^partial$" | wc -l) \
 
  72    NEWLS
=$(ls -ld $ARCHIVES) 
  73    if [ "$CHECKDIR" = "true" ]; then 
  74       if [ "$OLDLS" = "$NEWLS" ]; then 
  79    # Check the cleaning mode 
  80    case $(echo $CLEAN | tr '[:upper:]' '[:lower:]') in 
  82        $APTGET "$APT_OPT0" "$APT_OPT1" autoclean 
&& 
  83            echo $
"Press enter to continue." && read RES 
&& exit 0; 
  86        $APTGET "$APT_OPT0" "$APT_OPT1" clean 
&& 
  87            echo $
"Press enter to continue." && read RES 
&& exit 0; 
  91        echo -n $
"Do you want to erase any previously downloaded .deb files?" 
  92        if [ $(yesno "" y) = y 
]; then 
  93           $APTGET "$APT_OPT0" "$APT_OPT1" clean 
&& 
  94             echo $
"Press enter to continue." && read RES 
&& exit 0; 
 101    echo $
"Some errors occurred while unpacking. Packages that were installed" 
 102    echo $
"will be configured. This may result in duplicate errors" 
 103    echo $
"or errors caused by missing dependencies. This is OK, only the errors" 
 104    echo $
"above this message are important. Please fix them and run [I]nstall again" 
 105    echo $
"Press enter to continue." 
 106    read RES 
&& $DPKG "$DPKG_OPTS" --configure -a