From 5adc8a9faaebe0a180ed8a3d10fc3e17dde7d29c Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Sat, 26 Sep 2015 12:13:23 +0000 Subject: Extend @sample to accept arguments Maintainers can now use @sample sample_file target_file for all cases that does not fall into the usual @sample something.sample Reviewed by: antoine Differential Revision: https://reviews.freebsd.org/D3734 --- Keywords/sample.ucl | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) (limited to 'Keywords') diff --git a/Keywords/sample.ucl b/Keywords/sample.ucl index 834788cbc418..7ca2df923753 100644 --- a/Keywords/sample.ucl +++ b/Keywords/sample.ucl @@ -3,6 +3,10 @@ # MAINTAINER: portmgr@FreeBSD.org # # @sample etc/somefile.conf.sample +# or +# @sample file1 file2 +# +# Where file1 is considered as a sample file and file2 the target file # # This will install the somefile.conf.sample and automatically copy to # somefile.conf if it doesn't exist. On deinstall it will remove the @@ -14,24 +18,42 @@ # etc/pkgtools.conf.sample # @exec [ -f %B/pkgtools.conf ] || cp %B/%f %B/pkgtools.conf -actions: [file] +actions: [file(1)] +arguments: true post-install: <