From 8e9b2bcf4253fdf9a9a3f6e9b2557823388da2c0 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 14 Jul 2011 12:53:52 +0200 Subject: [PATCH] xbps-src: added new helper script to return dependency list. --- xbps-src/libexec/Makefile | 2 +- .../libexec/xbps-src-getdeps-helper.sh.in | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 xbps-src/libexec/xbps-src-getdeps-helper.sh.in 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