/[scripts]/trunk/apt-iselect
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/apt-iselect

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3 by dpavlin, Tue Jul 27 09:08:17 2004 UTC revision 4 by dpavlin, Tue Jul 27 11:51:10 2004 UTC
# Line 22  Line 22 
22  #               to Tobias Gruetzmacher who reported this bug)  #               to Tobias Gruetzmacher who reported this bug)
23  # 2003-09-04 moved do_sudo before first call (fixes bug when trying to  # 2003-09-04 moved do_sudo before first call (fixes bug when trying to
24  #               install iselect)  #               install iselect)
25  # 2003-10-09 allow multi-selection of packages to view and install  # 2003-10-09 allow multi-selection of packages to view details
26  # 2003-11-13 fix for RedHat 9.0 mktemp bug suggested by Dobes Vandermeer  # 2003-11-13 fix for RedHat 9.0 mktemp bug suggested by Dobes Vandermeer
27    # 2004-07-27 allow multi-selection of packages to install
28  #  #
29  # I know it's ugly, but it's still faster than aptitude :-)  # I know it's ugly, but it's still faster than aptitude :-)
30  #  #
# Line 70  pkg=`mktemp /tmp/tmp-pkg.XXXXXX` || ( ec Line 71  pkg=`mktemp /tmp/tmp-pkg.XXXXXX` || ( ec
71  rmtemp() {  rmtemp() {
72          rm -f $res          rm -f $res
73          rm -f $res2          rm -f $res2
74            test -f $sel && rm -f $sel
75          rm -f $pkg          rm -f $pkg
76  }  }
77    
# Line 131  while [ $loop = 1 ] ; do Line 133  while [ $loop = 1 ] ; do
133                  done                  done
134                  echo '{s}Back to search results' >> $pkg                  echo '{s}Back to search results' >> $pkg
135    
136                  tmp=`iselect -d '{,}' -n "Packages: $pkg_list" < $pkg`                  tmp=`iselect -d '{,}' -n "Packages: $pkg_list" -m < $pkg`
137                  if echo $tmp | grep -i back >/dev/null ; then                  if echo $tmp | grep -i back >/dev/null ; then
138                          loop=1                          loop=1
139                  elif echo $tmp | grep '^Package: ' >/dev/null ; then                  elif echo $tmp | grep '^Package: ' >/dev/null ; then
140                          deb=`echo $tmp | sed 's,{b/*},,g' | cut -d: -f2 | sed 's/^ *//'`                          deb=`echo $tmp | sed -e 's,{b/*},,g' -e 's,Package: *,,g'`
141                          do_sudo "Installing '$deb'" apt-get install $deb                          do_sudo "Installing '$deb'" apt-get install $deb
142                  elif [ -z "$tmp" ] ; then                  elif [ -z "$tmp" ] ; then
143                          loop=1                          loop=1

Legend:
Removed from v.3  
changed lines
  Added in v.4

  ViewVC Help
Powered by ViewVC 1.1.26