#!/bin/bash echo "Start export config ...\n" CUR_PATH=`pwd` echo "current work path:$CUR_PATH\n\n\n" PATH_LUBAN_DLL=$CUR_PATH/Luban.ClientServer/Luban.ClientServer.dll INPUT_DATA_DIR=$CUR_PATH/Datas PATH_DEFINE_FILE=$CUR_PATH/Defines/__root__.xml OUTPUT_CODE_DIR=$CUR_PATH/code OUTPUT_DATA_DIR=$CUR_PATH/data rm -rf $OUTPUT_CODE_DIR rm -rf $OUTPUT_DATA_DIR mkdir -p $OUTPUT_CODE_DIR mkdir -p $OUTPUT_DATA_DIR echo "start export .." dotnet $PATH_LUBAN_DLL -j cfg -- \ --input_data_dir $INPUT_DATA_DIR \ --output_code_dir $OUTPUT_CODE_DIR \ --output_data_dir $OUTPUT_DATA_DIR \ --gen_types data_json,code_go_json -s server \ --define_file $PATH_DEFINE_FILE \ --go:bright_module_name xsf_cfg find $OUTPUT_CODE_DIR -type f -exec sed -i '' 's/package cfg/package xsf_scp/g' {} + scp $OUTPUT_CODE_DIR/*.go root@8.137.21.7:~/WLGCZ/schema/ scp $OUTPUT_DATA_DIR/*.json root@8.137.21.7:~/WLGCZ/bin/scp/ rm -rf $OUTPUT_CODE_DIR rm -rf $OUTPUT_DATA_DIR echo "export done ..."