summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2012-07-30 01:53:56 +0200
committerDaniel Baumann <daniel@debian.org>2012-07-30 18:19:23 +0200
commit913c6037af2c4a7fb03e6c73f233f96149a735cd (patch)
tree86c1e6703540b765710e2290a7e3a8408ed9a597 /share
parenta48c974c9ca35c0ded39df3ab6ac91c415d08f13 (diff)
downloadvyos-live-build-913c6037af2c4a7fb03e6c73f233f96149a735cd.tar.gz
vyos-live-build-913c6037af2c4a7fb03e6c73f233f96149a735cd.zip
Adding shortcut helper for dctrl-tools.
This 'Packages' shortcut helper can be used for simplified usage of grep-aptavailable from dctrl-tools. Rather than needing to specify the following explicit command: ! grep-aptavail -n -sPackage -FPriority standard in package lists, the following shortcut can be used: ! Packages Priority standard
Diffstat (limited to 'share')
-rwxr-xr-xshare/bin/Packages30
1 files changed, 30 insertions, 0 deletions
diff --git a/share/bin/Packages b/share/bin/Packages
new file mode 100755
index 000000000..06ce05ed3
--- /dev/null
+++ b/share/bin/Packages
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+## live-build(7) - System Build Scripts
+## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org>
+##
+## live-build comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
+## 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
+
+if [ -z "${@}" ]
+then
+ echo "Usage: $(basename ${0}) FIELD VALUE"
+
+ exit 1
+fi
+
+_FIELD="${1}"
+_VALUE="${2}"
+
+grep-aptavail -n -sPackage -F${_FIELD} ${_VALUE} | sort