OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall Root: /e/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-re Date: 22-Mar-2003 21:52:20 Branch: HEAD Handle: 2003032220522000 Modified files: openpkg-re openpkg-dev Log: add our old ftp searching stuff as 'openpkg-dev search <name>' here, too Summary: Revision Changes Path 1.66 +31 -1 openpkg-re/openpkg-dev ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-re/openpkg-dev ============================================================================ $ cvs diff -u -r1.65 -r1.66 openpkg-dev --- openpkg-re/openpkg-dev 20 Mar 2003 19:53:01 -0000 1.65 +++ openpkg-re/openpkg-dev 22 Mar 2003 20:52:20 -0000 1.66 @@ -1086,6 +1086,35 @@ done } +search_for () { + URL=`echo $2 | sed -e 's| *$||'` + PKG=`${OPENPKG_INST}/lib/openpkg/curl -l -s $URL |\ + sed -e 's|[^-a-zA-Z0-9_\.]||g' |\ + grep "^$1" | sort` + if [ ".$PKG" != . ]; then + for pkg in $PKG; do + NAME=`echo "$pkg" | sed -e 's;\.src\.rpm$;;' -e 's;\.src\.sh$;;'` + NAME=`echo "$NAME ........................................" | cut -c-35` + DLOC=`echo "$pkg" | sed -e "s;^;$URL;"` + echo "$NAME $DLOC" + done + fi +} + +search () { + for i in "$@"; do + search_for $i ftp://ftp.openpkg.org/current/SRC/ + search_for $i ftp://ftp.openpkg.org/release/1.2/UPD/ + search_for $i ftp://ftp.openpkg.org/release/1.2/SRC/ + search_for $i ftp://ftp.openpkg.org/release/1.2/SRC/PLUS/ + search_for $i ftp://ftp.openpkg.org/release/1.1/UPD/ + search_for $i ftp://ftp.openpkg.org/release/1.1/SRC/ + search_for $i ftp://ftp.openpkg.org/release/1.1/SRC/PLUS/ + search_for $i ftp://ftp.openpkg.org/release/1.0/UPD/ + search_for $i ftp://ftp.openpkg.org/release/1.0/SRC/ + done +} + # ------------------------------------------------------------ if [ $# -eq 0 ]; then @@ -1107,13 +1136,14 @@ # handle command case ${cmd} in - setup | s* ) cmd="setup" ;; + setup | set*) cmd="setup" ;; bash | ba* ) cmd="bash" ;; update | u* ) cmd="update" ;; package | p* ) cmd="package" ;; branch | br* ) cmd="branch" ;; execute | e* ) cmd="execute" ;; list | l* ) cmd="list" ;; + search | sea*) cmd="search" ;; diff | d* ) cmd="diff" ;; release | r* ) cmd="release" ;; kill | k* ) cmd="kill" ;; @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List [EMAIL PROTECTED]