diff --git a/xbps-src/libexec/Makefile b/xbps-src/libexec/Makefile index 7ac55012b45..dee44e4da1f 100644 --- a/xbps-src/libexec/Makefile +++ b/xbps-src/libexec/Makefile @@ -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 diff --git a/xbps-src/libexec/xbps-src-getdeps-helper.sh.in b/xbps-src/libexec/xbps-src-getdeps-helper.sh.in new file mode 100644 index 00000000000..e99c140b3a7 --- /dev/null +++ b/xbps-src/libexec/xbps-src-getdeps-helper.sh.in @@ -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) " && 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