diff options
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -2,7 +2,7 @@ # resolve python-version to use if [ "$PYTHON" == "" ] ; then - if ! PYTHON=$(command -v python || command -v python2 || command -v python 2.7) + if ! PYTHON=$(command -v python2.7 || command -v python2 || command -v python) then echo "Unable to locate build-dependency python2.x!" 1>&2 exit 1 @@ -74,6 +74,10 @@ initHostDistroRid() fi fi fi + if [ "$__HostOS" == "FreeBSD" ]; then + __freebsd_version=`sysctl -n kern.osrelease | cut -f1 -d'.'` + __HostDistroRid="freebsd.$__freebsd_version-$__HostArch" + fi if [ "$__HostDistroRid" == "" ]; then echo "WARNING: Can not determine runtime id for current distro." @@ -107,6 +111,8 @@ initTargetDistroRid() export __DistroRid="linux-$__BuildArch" elif [ "$__BuildOS" == "OSX" ]; then export __DistroRid="osx-$__BuildArch" + elif [ "$__BuildOS" == "FreeBSD" ]; then + export __DistroRid="freebsd-$__BuildArch" fi fi } @@ -553,6 +559,10 @@ case $CPUName in __HostArch=arm64 ;; + amd64) + __BuildArch=x64 + __HostArch=x64 + ;; *) echo "Unknown CPU $CPUName detected, configuring as if for x64" __BuildArch=x64 @@ -860,6 +870,16 @@ while :; do exit 1 fi ;; + osgroup|-osgroup) + if [ -n "$2" ]; then + __BuildOS="$2" + shift + else + echo "ERROR: 'osgroup' requires a non-empty option argument" + exit 1 + fi + ;; + *) __UnprocessedBuildArgs="$__UnprocessedBuildArgs $1" ;; |