apisix/utils/update_nginx_conf_dev.sh
2019-06-15 23:22:29 +08:00

13 lines
329 B
Bash
Executable File

#!/bin/sh
lua_version=`lua -e "print(_VERSION)" | grep -o -E "(5.[0-9])"`
if [ $lua_version = "5.1" ];then
echo "current Lua version is 5.1, skip to update conf/nginx.conf"
exit
fi
sed s"?lua/5.1?lua/$lua_version?" conf/nginx.conf > conf/nginx.conf.tmp
mv conf/nginx.conf.tmp conf/nginx.conf
echo "updated nginx.conf"