aboutsummaryrefslogtreecommitdiffstats
path: root/Keywords
diff options
context:
space:
mode:
authorantoine <antoine@FreeBSD.org>2014-09-02 01:06:19 +0800
committerantoine <antoine@FreeBSD.org>2014-09-02 01:06:19 +0800
commite44e200e66d70c8ac399c7fdfe36b029482fd6f1 (patch)
tree30b9f411ae0f09270332ca8a1c3f95470871f870 /Keywords
parentd7a45dba15aa14e693a6e4d4c52b048451f3ccd0 (diff)
downloadfreebsd-ports-gnome-e44e200e66d70c8ac399c7fdfe36b029482fd6f1.tar.gz
freebsd-ports-gnome-e44e200e66d70c8ac399c7fdfe36b029482fd6f1.tar.zst
freebsd-ports-gnome-e44e200e66d70c8ac399c7fdfe36b029482fd6f1.zip
- Make it possible to use sample keyword with a full path
- Prefer @dirrmtry over @unexec rmdir in makeplist Differential Revision: https://reviews.freebsd.org/D705 Reviewed by: bapt With hat: portmgr
Diffstat (limited to 'Keywords')
-rw-r--r--Keywords/sample.ucl10
-rw-r--r--Keywords/sample.yaml10
2 files changed, 16 insertions, 4 deletions
diff --git a/Keywords/sample.ucl b/Keywords/sample.ucl
index 6c9ac688bd0d..a1d7085dc24e 100644
--- a/Keywords/sample.ucl
+++ b/Keywords/sample.ucl
@@ -16,14 +16,20 @@
actions: [file]
post-install: <<EOD
- sample_file="%D/%@"
+ case "%@" in
+ /*) sample_file="%@" ;;
+ *) sample_file="%D/%@" ;;
+ esac
target_file="${sample_file%.sample}"
if ! [ -f "${target_file}" ]; then
/bin/cp -p "${sample_file}" "${target_file}"
fi
EOD
pre-deinstall: <<EOD
- sample_file="%D/%@"
+ case "%@" in
+ /*) sample_file="%@" ;;
+ *) sample_file="%D/%@" ;;
+ esac
target_file="${sample_file%.sample}"
if cmp -s "${target_file}" "${sample_file}"; then
rm -f "${target_file}"
diff --git a/Keywords/sample.yaml b/Keywords/sample.yaml
index 4d56793acca1..854320df7f07 100644
--- a/Keywords/sample.yaml
+++ b/Keywords/sample.yaml
@@ -16,13 +16,19 @@
actions: [file]
post-install: |
- sample_file="%D/%@"
+ case "%@" in
+ /*) sample_file="%@" ;;
+ *) sample_file="%D/%@" ;;
+ esac
target_file="${sample_file%.sample}"
if ! [ -f "${target_file}" ]; then
/bin/cp -p "${sample_file}" "${target_file}"
fi
pre-deinstall: |
- sample_file="%D/%@"
+ case "%@" in
+ /*) sample_file="%@" ;;
+ *) sample_file="%D/%@" ;;
+ esac
target_file="${sample_file%.sample}"
if cmp -s "${target_file}" "${sample_file}"; then
rm -f "${target_file}"