aboutsummaryrefslogtreecommitdiff
path: root/Keywords/sample.ucl
diff options
context:
space:
mode:
Diffstat (limited to 'Keywords/sample.ucl')
-rw-r--r--Keywords/sample.ucl10
1 files changed, 8 insertions, 2 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}"