search and install packages via bash?

Ulli Horlacher framstag@rus.uni-stuttgart.de
Thu Jul 8 14:19:13 GMT 2021


On Thu 2021-07-08 (13:13), Jon Turney wrote:

> You could possibly build something equivalent using 'cygcheck -p' and 
> then processing it's output

This part was easy:


W10dev:/usr/local/bin: cygsearch ksh
Found 449 matches for ksh
kshisen-debuginfo-17.04.3-1 - kshisen-debuginfo: Debug info for kshisen
kshisen-debuginfo-17.08.3-1 - kshisen-debuginfo: Debug info for kshisen
kshisen-debuginfo-17.12.3-1 - kshisen-debuginfo: Debug info for kshisen
kshisen-17.04.3-1-src - kshisen-src: KDE Shisensho game (source)
kshisen-17.08.3-1-src - kshisen-src: KDE Shisensho game (source)
kshisen-17.12.3-1-src - kshisen-src: KDE Shisensho game (source)
kshisen-17.04.3-1 - kshisen: KDE Shisensho game
kshisen-17.08.3-1 - kshisen: KDE Shisensho game
kshisen-17.12.3-1 - kshisen: KDE Shisensho game
mksh-debuginfo-53a-1 - mksh-debuginfo: Debug info for mksh (installed binaries and support files)
mksh-debuginfo-54-1 - mksh-debuginfo: Debug info for mksh (installed binaries and support files)
mksh-debuginfo-56c-1 - mksh-debuginfo: Debug info for mksh
mksh-53a-1-src - mksh-src: MirBSD Korn Shell (source)
mksh-54-1-src - mksh-src: MirBSD Korn Shell (source)
mksh-56c-1-src - mksh-src: MirBSD Korn Shell (source)
mksh-53a-1 - mksh: MirBSD Korn Shell (installed binaries and support files)
mksh-54-1 - mksh: MirBSD Korn Shell (installed binaries and support files)
mksh-56c-1 - mksh: MirBSD Korn Shell


W10dev:/usr/local/bin: cat cygsearch
#!/bin/bash

prg=$(basename $)

if [ -z "$1" -o "$1" = "-h" ]; then
  echo "usage: $prg [-a] EXPRESSION"
  echo "example: $prg zsh"
  echo "see also: cygcheck, cyginstall"
  exit
fi

if [ "$1" = "-a" ]; then
  cygcheck -p "$2"
else
  cygcheck -p "$1" | grep "$1"
fi


-- 
Ullrich Horlacher              Server und Virtualisierung
Rechenzentrum TIK         
Universitaet Stuttgart         E-Mail: horlacher@tik.uni-stuttgart.de
Allmandring 30a                Tel:    ++49-711-68565868
70569 Stuttgart (Germany)      WWW:    http://www.tik.uni-stuttgart.de/
REF:<bf14fb2b-ddf5-8618-0da3-9ea5531c5877@dronecode.org.uk>


More information about the Cygwin mailing list