]> git.saurik.com Git - apt.git/blobdiff - dselect/install
Better description
[apt.git] / dselect / install
index 7c42374580e44aa5fa5fb3fa8e2a42c20306a830..2481fcea1e30ae2c241cf3953b415468549bc54a 100755 (executable)
@@ -5,14 +5,14 @@ CLEAN="auto"
 OPTS="-f"
 APTGET="/usr/bin/apt-get"
 DPKG="/usr/bin/dpkg"
-sh -e
+set -e
 RES=`apt-config shell CLEAN DSelect::Clean OPTS DSelect::Options \
                       DPKG Dir::Bin::dpkg APTGET Dir::Bin::apt-get`
 eval $RES
-sh +e
+set +e
 
 # Yes/No Prompter
-function yesno() {
+yesno() {
 # $1 = prompt
 # $2 = default(y)
        local ans def defp
@@ -37,7 +37,7 @@ function yesno() {
        echo $ans | tr YN yn
 }
 
-#$APTGET $OPTS dselect-upgrade
+$APTGET $OPTS dselect-upgrade
 RES=$?
 
 # 1 means the user choose no at the prompt
@@ -49,7 +49,10 @@ fi
 if [ $RES -eq 0 ]; then
    # Check the cleaning mode
    case `echo $CLEAN | tr '[:upper:]' '[:lower:]'` in
-     always|auto) 
+     auto)
+       $APTGET autoclean && echo "Press enter to continue." && read RES && exit 0;
+       ;;
+     always)
        $APTGET clean && echo "Press enter to continue." && read RES && exit 0;
        ;;
      prompt)