xbps-src: added new helper script to return dependency list.

This commit is contained in:
Juan RP 2011-07-14 12:53:52 +02:00
parent 47025ec4c6
commit 8e9b2bcf42
2 changed files with 25 additions and 1 deletions

View File

@ -1,6 +1,6 @@
include ../vars.mk
SH_BINS = xbps-src-chroot-helper xbps-src-doinst-helper
SH_BINS = xbps-src-chroot-helper xbps-src-doinst-helper xbps-src-getdeps-helper
MOUNT_BIN = xbps-src-chroot-capmount
UMOUNT_BIN = xbps-src-chroot-capumount
CHROOT_BIN = xbps-src-capchroot

View File

@ -0,0 +1,24 @@
#!/bin/sh
set -e
. @@XBPS_INSTALL_ETCDIR@@/xbps-src.conf
. @@XBPS_INSTALL_SHAREDIR@@/shutils/init_funcs.sh
set_defvars
. $XBPS_SHUTILSDIR/tmpl_funcs.sh
. $XBPS_SHUTILSDIR/common_funcs.sh
[ $# -ne 2 ] && echo "usage: $(basename $0) <run|build> <pkgname>" && exit 1
setup_subpkg_tmpl $2
if [ "$1" = "run" ]; then
[ -n "$run_depends" ] && echo "$run_depends"
elif [ "$1" = "build" ]; then
[ -n "$build_depends" ] && echo "$build_depends"
else
usage
fi
exit 0