Changeset View
Changeset View
Standalone View
Standalone View
Keywords/sample.ucl
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | if [ $# -eq 2 ]; then | ||||
target_file=${2} | target_file=${2} | ||||
fi | fi | ||||
case "${target_file}" in | case "${target_file}" in | ||||
/*) target_file="${target_file}" ;; | /*) target_file="${target_file}" ;; | ||||
*) target_file="%D/${target_file}" ;; | *) target_file="%D/${target_file}" ;; | ||||
esac | esac | ||||
if cmp -s "${target_file}" "${sample_file}"; then | if cmp -s "${target_file}" "${sample_file}"; then | ||||
rm -f "${target_file}" | rm -f "${target_file}" | ||||
else | else | ||||
mat: Can you use `[ bla ]` and not `test` to be consistent. | |||||
echo "You may need to manually remove ${target_file} if it is no longer needed." | test ! -e "${target_file}" || echo "You may need to manually remove ${target_file} if it is no longer needed." | ||||
matUnsubmitted Done Inline ActionsCan you make this a elif. We try not to use || or other operators and always use flow control structures. mat: Can you make this a `elif`. We try not to use || or other operators and always use flow control… | |||||
fi | fi | ||||
EOD | EOD |
Can you use [ bla ] and not test to be consistent.