don't unnecessarily convert exit codes to strings

Closes: #952861
This commit is contained in:
Lyndon Brown 2020-02-12 02:40:38 +00:00 committed by Raphaël Hertzog
parent f3544ff68e
commit 2511fff259
5 changed files with 7 additions and 8 deletions

View File

@ -12,7 +12,7 @@ Arguments ()
{
ARGUMENTS="$(getopt --longoptions breakpoints,color,conffile:,debug,force,help,quiet,usage,verbose,version --name=${PROGRAM} --options c:huv --shell sh -- "${@}")"
if [ "${?}" != "0" ]
if [ $? -ne 0 ]
then
Echo_error "terminating" >&2
exit 1

View File

@ -34,7 +34,7 @@ Chroot ()
${_LINUX32} chroot "${CHROOT}" /usr/bin/env -i HOME="/root" PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" TERM="${TERM}" DEBIAN_FRONTEND="${LB_DEBCONF_FRONTEND}" DEBIAN_PRIORITY="${LB_DEBCONF_PRIORITY}" DEBCONF_NONINTERACTIVE_SEEN="true" DEBCONF_NOWARNINGS="true" ${ENV} ${COMMANDS}
return "${?}"
return ${?}
}
Chroot_has_package() {

View File

@ -149,11 +149,11 @@ Echo_warning ()
Echo_status ()
{
__RETURN="${?}"
__RETURN=$?
if [ "${_COLOR}" = "false" ]
then
if [ "${__RETURN}" = "0" ]
if [ $__RETURN -eq 0 ]
then
printf " done.\n"
else
@ -162,7 +162,7 @@ Echo_status ()
else
Cursor_columns_backward 8
if [ "${__RETURN}" = "0" ]
if [ $__RETURN -eq 0 ]
then
printf " ${GREEN}done${NO_COLOR}. \n"
else

View File

@ -10,7 +10,7 @@
Exit ()
{
VALUE="${?}"
VALUE=$?
if [ "${_DEBUG}" = "true" ]
then

View File

@ -166,8 +166,7 @@ Local_arguments ()
LONG_OPTIONS="$(echo ${LONG_OPTIONS} | tr -d ' ')"
ARGUMENTS="$(getopt --longoptions ${LONG_OPTIONS} --name="${PROGRAM}" --options a:d:m:k:b:s:c:huv --shell sh -- "${@}")"
if [ "${?}" != "0" ]
then
if [ $? -ne 0 ]; then
Echo_error "terminating" >&2
exit 1
fi