exit 0, but warn if gencode is not executable

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-02-22 22:40:34 +01:00
parent 8414f94703
commit 30919f126b
1 changed files with 9 additions and 4 deletions

View File

@ -51,8 +51,13 @@ cat << eof
eof
[ -x "$gencode" ] && __cdist_exec_fail_on_error "$gencode" "$__cdist_object_id"
# Ensure non-error exit status
exit 0
if [ -x "$gencode" ]; then
__cdist_exec_fail_on_error "$gencode" "$__cdist_object_id"
else
if [ -f "$gencode" ]; then
echo "$gencode" exists, but is not executable >&2
fi
# No gencode? also fine! Ensure we exit 0
exit 0
fi