2012-07-29 23:53:56 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
## live-build(7) - System Build Scripts
|
2015-01-04 18:05:39 -01:00
|
|
|
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
|
2012-07-29 23:53:56 +00:00
|
|
|
##
|
2012-07-29 23:59:00 +00:00
|
|
|
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
|
2012-07-29 23:53:56 +00:00
|
|
|
## This is free software, and you are welcome to redistribute it
|
|
|
|
## under certain conditions; see COPYING for details.
|
|
|
|
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
if [ ! -e /usr/bin/grep-aptavail ]
|
|
|
|
then
|
|
|
|
echo "E: /usr/bin/grep-aptavail: No such file."
|
|
|
|
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2012-09-29 13:42:38 +00:00
|
|
|
if [ -z "${2}" ]
|
2012-07-29 23:53:56 +00:00
|
|
|
then
|
|
|
|
echo "Usage: $(basename ${0}) FIELD VALUE"
|
|
|
|
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
_FIELD="${1}"
|
|
|
|
_VALUE="${2}"
|
|
|
|
|
2014-08-15 12:51:22 +00:00
|
|
|
# For compatibility with tasksel, exclude lib and non-main packages
|
|
|
|
grep-aptavail -n -sPackage -F${_FIELD} ${_VALUE} -a -! -e -FSection '^(lib|/)' | sort
|