Skip to content

Instantly share code, notes, and snippets.

@mongrelP
Created July 4, 2011 10:07
Show Gist options
  • Save mongrelP/1063167 to your computer and use it in GitHub Desktop.
Save mongrelP/1063167 to your computer and use it in GitHub Desktop.
MinGW Package search tool
@sshtyck
Copy link

sshtyck commented May 21, 2013

's/<package-list .* catalogue="//p'

@rleonhardt
Copy link

#!/bin/sh
# Changelog: Remove leading spaces, skip additional attributes like issue="2012073100"
#2 files: mingw32-package-list.xml msys-package-list.xml
mingw_get_data=/mingw/var/lib/mingw-get/data/*-package-list.xml
if [ $# -eq 0 ] ; then
    #show list
    cat $mingw_get_data | \
    sed -n 's/[ \t]*<package-list [^>]*catalogue="//p' | sed 's/"[^>]*>//'
else
    #grep search
    cat $mingw_get_data | \
    sed -n 's/[ \t]*<package-list [^>]*catalogue="//p' | sed 's/"[^>]*>//' |\
    grep $@
fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment