diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2020-10-22 08:20:07 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2020-10-22 08:20:07 +0000 |
commit | 45193bf2af2db709b1c3998ddc0cdf1e744d5f94 (patch) | |
tree | cca4e49999d8b7d029e2102c879bfbffde018960 /Keywords | |
parent | Update net/croc to version 8.6.2. (diff) |
Add new keyword rmempty
The goal is to replace all the hand crafted @*unexec test -s XXX && rm by a proper
keyword.
this keyword is also rootdir compliant
Reviewed by: manu, mat
Approved by: portmgr (mat)
Differential Revision: https://reviews.freebsd.org/D26633
Notes
Notes:
svn path=/head/; revision=552943
Diffstat (limited to 'Keywords')
-rw-r--r-- | Keywords/rmempty.ucl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Keywords/rmempty.ucl b/Keywords/rmempty.ucl new file mode 100644 index 000000000000..399ff764d163 --- /dev/null +++ b/Keywords/rmempty.ucl @@ -0,0 +1,11 @@ +# $FreeBSD$ +# +# MAINTAINER: portmgr@FreeBSD.org +actions: [] +pre-deinstall-lua: <<EOD + file = pkg.prefixed_path("%@") + local st = pkg.stat(file) + if st and st.type == "reg" and st.size == 0 then + os.remove(file) + end +EOD |