You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
eend() {
local retval="${1:-0}"
shift
if [ "$retval" -gt 0 ]; then
printf " %s-> Failed (rc=%s)%s\\n" "${BAD}" "${retval}" "${NORMAL}"
fi
return "$retval"
}
eend 0 just results in return 0 which doesn't do anything.
In preparation of #224 for code simplification it would be best to remove these.
A very few cases are a tiny bit more complex.
if cp "$AUTHORIZED_KEYS_SOURCE" "$AUTHORIZED_KEYS_TARGET" ; then
eend 0
else
eerror "Error: copying '$AUTHORIZED_KEYS_SOURCE' to '$AUTHORIZED_KEYS_TARGET' failed"
eend 1
bailout 1
fi
Could rewrite to:
if ! cp "$AUTHORIZED_KEYS_SOURCE" "$AUTHORIZED_KEYS_TARGET" ; then
eerror "Error: copying '$AUTHORIZED_KEYS_SOURCE' to '$AUTHORIZED_KEYS_TARGET' failed"
eend 1
bailout 1
fi
The text was updated successfully, but these errors were encountered:
eend 0
just results inreturn 0
which doesn't do anything.In preparation of #224 for code simplification it would be best to remove these.
A very few cases are a tiny bit more complex.
Could rewrite to:
The text was updated successfully, but these errors were encountered: