mirror of
https://github.com/balena-io/open-balena.git
synced 2025-01-31 00:23:54 +00:00
Merge pull request #45 from roman-mazur/roman/fix-build
scripts: Handle missing coreutils on Mac
This commit is contained in:
commit
98b6100fed
@ -1,5 +1,11 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
echo_error() {
|
||||||
|
local RED=`tput setaf 1`
|
||||||
|
local RESET=`tput sgr0`
|
||||||
|
echo "${RED}ERROR: ${1}${RESET}"
|
||||||
|
}
|
||||||
|
|
||||||
REALPATH=
|
REALPATH=
|
||||||
REALPATHS=(
|
REALPATHS=(
|
||||||
'realpath'
|
'realpath'
|
||||||
@ -14,8 +20,13 @@ fi
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [ -z "${REALPATH}" ]; then
|
if [ -z "${REALPATH}" ]; then
|
||||||
local RED=`tput setaf 1`
|
echo_error 'Unable to find suitable command for realpath.'
|
||||||
echo "${RED}ERROR: Unable to find suitable command for realpath."
|
if [ $(uname) == 'Darwin' ]; then
|
||||||
|
echo 'GNU coreutils are required to build openBalena on MacOS. To install with brew, run'
|
||||||
|
echo ''
|
||||||
|
echo ' brew install coreutils'
|
||||||
|
echo ''
|
||||||
|
fi
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user