[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

shellscript error, in live-build



scripts/build/lb_binary_local-hooks : line 53, as follow
                 ./"${HOOK}" || ( Echo_error "${HOOK} failed (exit
non-zero). You should check for errors."; exit 1 )

I think that's not what you want. "exit 1" there, is in a subshell,
and this subshell will end
 with exit command or not. You want exit from the current shell, and
you must use the
 construction '{ list ; }'. The line will must be:
                 ./"${HOOK}" || { Echo_error "${HOOK} failed (exit
non-zero). You should check for errors."; exit 1 ;}
Its is valid for bash and dash.

searching for same error:
$ egrep -r  '; *exit +[0-9] *\)' /usr/share/live/build/scripts/build/
/usr/share/live/build/scripts/build/lb_chroot_local-hooks:		Chroot
chroot "/root/$(basename ${HOOK})" || ( Echo_error "${HOOK} failed
(exit non-zero). You should check for errors."; exit 1 )
/usr/share/live/build/scripts/build/lb_chroot_hooks:		Chroot chroot
"./root/${HOOK}" || ( Echo_error "${HOOK} failed (exit non-zero). You
should check for errors."; exit 1 )
/usr/share/live/build/scripts/build/lb_binary_local-hooks:		./"${HOOK}"
|| ( Echo_error "${HOOK} failed (exit non-zero). You should check for
errors."; exit 1 )


Reply to: