Page MenuHomeFreeBSD

D3734.id8941.diff
No OneTemporary

D3734.id8941.diff

Index: Keywords/sample.ucl
===================================================================
--- Keywords/sample.ucl
+++ Keywords/sample.ucl
@@ -14,24 +14,43 @@
# etc/pkgtools.conf.sample
# @exec [ -f %B/pkgtools.conf ] || cp %B/%f %B/pkgtools.conf
-actions: [file]
+actions: [file(1)]
+arguments: true
post-install: <<EOD
- case "%@" in
- /*) sample_file="%@" ;;
- *) sample_file="%D/%@" ;;
+ set -x
+ case "%1" in
+ /*) sample_file="%1" ;;
+ *) sample_file="%D/%1" ;;
esac
target_file="${sample_file%.sample}"
+ set -- %@
+ if [ $# -eq 2 ]; then
+ target_file=${2}
+ fi
+ case "${target_file}" in
+ /*) target_file="${target_file}" ;;
+ *) target_file="%D/${target_file}" ;;
+ esac
if ! [ -f "${target_file}" ]; then
/bin/cp -p "${sample_file}" "${target_file}" && \
/bin/chmod u+w "${target_file}"
fi
EOD
pre-deinstall: <<EOD
- case "%@" in
- /*) sample_file="%@" ;;
- *) sample_file="%D/%@" ;;
+ case "%1" in
+ /*) sample_file="%1" ;;
+ *) sample_file="%D/%1" ;;
esac
target_file="${sample_file%.sample}"
+ set -- %@
+ if [ $# -eq 2 ]; then
+ set -- %@
+ target_file=${2}
+ fi
+ case "${target_file}" in
+ /*) target_file="${target_file}" ;;
+ *) target_file="%D/${target_file}" ;;
+ esac
if cmp -s "${target_file}" "${sample_file}"; then
rm -f "${target_file}"
else

File Metadata

Mime Type
text/plain
Expires
Wed, Apr 22, 10:28 PM (11 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32001391
Default Alt Text
D3734.id8941.diff (1 KB)

Event Timeline