#!/bin/bash set -x SYSTEM=`uname -s` BUILD_CONFIG=Debug PUBLISH_CONFIG=Release NETCOREVER=netcoreapp3.1 RUNTIME_MAC=osx.10.12-x64 RUNTIME=$RUNTIME_MAC Cli_Str="../../arpg_share_proj/protocol" if [ $SYSTEM = "Darwin" ] ; then echo "****************************** Begin build ******************************" else echo "Only run in mac build computer" exit 0 fi build_one_proj_exe() { dotnet restore $1 str=$Cli_Str"/"$RUNTIME"/bin" echo $str dotnet build $1 --configuration $BUILD_CONFIG --runtime $RUNTIME --output $str --framework $NETCOREVER if [ $? -ne 0 ]; then echo "****************************** build error ******************************" exit 0 fi } build_one_proj_exe protocsstruct echo $SYSTEM