/[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 8 by dpavlin, Sat Dec 4 15:39:21 2004 UTC revision 25 by dpavlin, Sat Jun 24 15:01:09 2006 UTC
# Line 25  Line 25 
25  # 2003-10-09 allow multi-selection of packages to view details  # 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  # 2004-07-27 allow multi-selection of packages to install
28  # 2004-12-04 Add quick install options  # 2004-12-04 add quick install options
29    # 2004-12-06 fixed multi-word search
30  #  #
31  # I know it's ugly, but it's still faster than aptitude :-)  # I know it's ugly, but it's still faster than aptitude :-)
32  #  #
# Line 82  LANG=C apt-cache stats 2>&1 | grep "^W: Line 83  LANG=C apt-cache stats 2>&1 | grep "^W:
83  trap 'rmtemp; exit 1' INT QUIT TERM SEGV  trap 'rmtemp; exit 1' INT QUIT TERM SEGV
84    
85  apt_cache_search() {  apt_cache_search() {
86          search_words="$@"          search_words="$*"
87    
88          echo "Searching apt-cache for \"$search_words\"..."          echo "Searching apt-cache for \"$search_words\"..."
89    
90          apt-cache search "$search_words" | head -1020 > $res          apt-cache search "$@" | head -1020 > $res
91          nr=`wc -l $res | sed 's/^ *//' | cut -d" " -f1`          nr=`wc -l $res | sed 's/^ *//' | cut -d" " -f1`
92          if [ $nr = 0 ] ; then          if [ $nr = 0 ] ; then
93                  echo "No results for \"$search_words\"" > $res2                  echo "No results for \"$search_words\"" > $res2
94                  nr="no"                  nr=0
95          else          else
96                  echo "$nr results for \"$search_words\", enter new search {s:search=%[Search for]S}" > $res2                  echo "$nr results for \"$search_words\", enter new search {s:search=%[Search for]S}" > $res2
97                  echo >> $res2                  echo >> $res2
98                  cat $res | sed 's/^/{s}/' >> $res2                  cat $res | sed 's/^/{s}/' >> $res2
         fi  
         if [ $nr -gt 0 ] ; then  
99                  echo >> $res2                  echo >> $res2
100                  echo "{s:_quick_install_}Install all selected" >> $res2                  echo "{s:_quick_install_}Install all selected" >> $res2
101          fi          fi

Legend:
Removed from v.8  
changed lines
  Added in v.25

  ViewVC Help
Powered by ViewVC 1.1.26