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
This commit is contained in:
parent
a48c974c9c
commit
913c6037af
2
Makefile
2
Makefile
|
@ -4,7 +4,7 @@ SHELL := sh -e
|
|||
|
||||
LANGUAGES = $(shell cd manpages/po && ls)
|
||||
|
||||
SCRIPTS = bin/* frontends/cgi/live-build-cgi frontends/cgi/live-build-cgi.cron functions/* examples/auto/* examples/hooks/* scripts/*.sh scripts/*/* share/hooks/*
|
||||
SCRIPTS = bin/* frontends/cgi/live-build-cgi frontends/cgi/live-build-cgi.cron functions/* examples/auto/* examples/hooks/* scripts/*.sh scripts/*/* share/bin/* share/hooks/*
|
||||
|
||||
all: build
|
||||
|
||||
|
|
|
@ -51,6 +51,13 @@ then
|
|||
# Installing depends
|
||||
Install_package
|
||||
|
||||
if [ -e "${LIVE_BUILD}/share/bin/Packages" ]
|
||||
then
|
||||
cp "${LIVE_BUILD}/share/bin/Packages" chroot/bin
|
||||
else
|
||||
cp /usr/share/live/build/bin/Packages chroot/bin
|
||||
fi
|
||||
|
||||
mkdir -p chroot/binary.deb/archives/partial
|
||||
mv chroot/var/lib/dpkg/status chroot/var/lib/dpkg/status.tmp
|
||||
touch chroot/var/lib/dpkg/status
|
||||
|
@ -121,6 +128,8 @@ then
|
|||
|
||||
cd "${OLDPWD}"
|
||||
|
||||
rm -f chroot/bin/Packages
|
||||
|
||||
rm -rf chroot/binary.deb
|
||||
mv chroot/var/lib/dpkg/status.tmp chroot/var/lib/dpkg/status
|
||||
|
||||
|
|
|
@ -55,6 +55,13 @@ then
|
|||
# Installing depends
|
||||
Install_package
|
||||
|
||||
if [ -e "${LIVE_BUILD}/share/bin/Packages" ]
|
||||
then
|
||||
cp "${LIVE_BUILD}/share/bin/Packages" chroot/bin
|
||||
else
|
||||
cp /usr/share/live/build/bin/Packages chroot/bin
|
||||
fi
|
||||
|
||||
for LIST in config/package-lists/*.list \
|
||||
config/package-lists/*.list.chroot \
|
||||
config/package-lists/*.list.chroot_${_PASS}
|
||||
|
@ -67,6 +74,8 @@ then
|
|||
fi
|
||||
done
|
||||
|
||||
rm -f chroot/bin/Packages
|
||||
|
||||
# Removing dctrl-tools again if the user has not installed it
|
||||
if ! grep -qs dctrl-tools chroot/root/packages.chroot
|
||||
then
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue