functions.sh: send error message to stderr

This commit is contained in:
Natanael Copa 2022-06-14 16:38:40 +02:00
parent 8219a3219f
commit 4d3c8c8533
1 changed files with 2 additions and 2 deletions

View File

@ -127,14 +127,14 @@ readconfig() {
USE_COLORS=${_USE_COLORS-$USE_COLORS}
USE_CCACHE=${_USE_CCACHE-$USE_CCACHE}
[ -z "$CBUILD" ] && CBUILD="$(${APK:-apk} --print-arch 2>/dev/null)"
[ -z "$CBUILD" ] && CBUILD="$(${APK:-apk} --print-arch 2>/dev/null || :)"
[ -z "$CHOST" ] && CHOST="$CBUILD"
[ -z "$CTARGET" ] && CTARGET="$CHOST"
[ "$(arch_to_hostspec $CBUILD)" != "unknown" ] && CBUILD="$(arch_to_hostspec $CBUILD)"
[ "$(arch_to_hostspec $CHOST)" != "unknown" ] && CHOST="$(arch_to_hostspec $CHOST)"
[ "$(arch_to_hostspec $CTARGET)" != "unknown" ] && CTARGET="$(arch_to_hostspec $CTARGET)"
if [ -z "$CBUILD" ]; then
echo "Unable to deduce build architecture. Install apk-tools, or set CBUILD."
echo "Unable to deduce build architecture. Install apk-tools, or set CBUILD." >&2
exit 1
fi