#!/bin/bash SYSTEM=`uname -s` RUNTIME_MAC=osx.10.12-x64 if [ $SYSTEM = "Darwin" ] ; then echo "run gen in mac build computer" chmod 774 $RUNTIME_MAC/protocsstruct OUTPATH=../../u2china_svr_proj/ServerComm/protocol if [ -d ${OUTPATH} ];then ./$RUNTIME_MAC/protocsstruct ./GameCs.proto ./GameSs.proto --csharp_out=${OUTPATH} echo "success svr ***********" fi OUTPATH=../../u2china_cli_proj/arpg/Assets/Scripts/AIMachine/HotFixLogic/protocol if [ -d ${OUTPATH} ];then ./$RUNTIME_MAC/protocsstruct ./GameCs.proto ./GameSs.proto --genclasscfg=./GenClassConfig --namespace=ProtoCSClass --csharp_out=${OUTPATH} -cna rm ${OUTPATH}/*_struct.cs rm ${OUTPATH}/FixedRepeatedStruct.cs rm ${OUTPATH}/GameSs_enum.cs echo "success cli ***********" fi else echo "only run in mac build computer" fi echo $SYSTEM