Created
July 4, 2011 10:07
-
-
Save mongrelP/1063167 to your computer and use it in GitHub Desktop.
MinGW Package search tool
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
#MinGW Package search tool | |
# | |
#author:mongrelP | |
#mailto:[email protected] | |
#Licence:CC0 or NYSL | |
#CCO: http://creativecommons.org/publicdomain/zero/1.0/ | |
#NYSL: http://www.kmonos.net/nysl/ | |
#nothing option : show list | |
#anything option : grep search | |
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/<package-list catalogue="//p' | sed 's/" \/>//' | |
else | |
#grep search | |
cat $mingw_get_data | \ | |
sed -n 's/<package-list catalogue="//p' | sed 's/" \/>//' |\ | |
grep $@ | |
fi | |
#!/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
's/<package-list .* catalogue="//p'