android_external_toybox/scripts/portability.sh
Eric Molitor 78991600dd Bash Compatibility Patch
I know that you are working on toysh which I'm looking forward to. In the
meantime below is a patch to improve compatibility with older/odd versions
of bash. This fixed a minor build issue I was having on MacOS (which was
using zsh in emulated bash mode) as well as an oddball embedded SDK using
a non-gnu version of bash. I believe these changes are minimal and should
be safe to apply, if not I wanted to at least get them on the mailing list
in case others ran into these issues.
2019-06-29 12:31:22 -05:00

15 lines
268 B
Bash

# sourced to find alternate names for things
source configure
if [ -z "$(command -v "${CROSS_COMPILE}${CC}")" ]
then
echo "No ${CROSS_COMPILE}${CC} found" >&2
exit 1
fi
if [ -z "$SED" ]
then
[ ! -z "$(command -v gsed 2>/dev/null)" ] && SED=gsed || SED=sed
fi