You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
1007 B

1 month ago
#!/bin/bash
set -x
for i in "$@"; do
if [[ $i = *"="* ]]; then
eval "$i"
fi
done
cur_dir=$(pwd)
lua_dir=$cur_dir/arpg/Assets/Lua
env_path=$lua_dir/Const/Env.lua
context_path=$lua_dir/Const/Context.lua
cat>$env_path<<EOF
local Env={debug=$debug,disableLog=$disableLog}
return Env
EOF
if [ ! $buildIP ];then
cat>$context_path<<EOF
local Context = Context or {lang="$lang",versionIP="$versionIP|$versionIP2",backupVersionIP="$backupVersionIP|$backupVersionIP2",versionPort="9701",gameIP="$gameIP",gamePort="9710",maintenanceIP="$maintenanceIP",buildMode="$mode",appVersion="$version",publishChannel="$publishChannel"}
return Context
EOF
else
cat>$context_path<<EOF
local Context = Context or {lang="$lang",versionIP="$versionIP|$versionIP2",backupVersionIP="$backupVersionIP|$backupVersionIP2",versionPort="9701",gameIP="$gameIP",gamePort="9710",maintenanceIP="$maintenanceIP",buildIP="$buildIP",buildMode="$mode",appVersion="$version",publishChannel="$publishChannel"}
return Context
EOF
fi