From 9c4c0ccb2cb8d66243d93b5dbd60d24dc53f42b7 Mon Sep 17 00:00:00 2001 From: liyong Date: Tue, 8 Feb 2022 14:14:57 +0800 Subject: [PATCH] modify details --- cp_scripts_alchemy_macos.sh => cp_scripts_alchemy.sh | 2 +- cp_scripts_local_macos.sh | 2 +- cp_scripts_moicen_macos.sh => cp_scripts_moicen.sh | 2 +- scripts/combine.lua | 2 +- scripts/convert_audio.lua | 2 +- scripts/test_upyun_upload.lua | 2 +- scripts/upyun_upload.lua | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) rename cp_scripts_alchemy_macos.sh => cp_scripts_alchemy.sh (95%) rename cp_scripts_moicen_macos.sh => cp_scripts_moicen.sh (95%) diff --git a/cp_scripts_alchemy_macos.sh b/cp_scripts_alchemy.sh similarity index 95% rename from cp_scripts_alchemy_macos.sh rename to cp_scripts_alchemy.sh index 252de4c..b8853b8 100755 --- a/cp_scripts_alchemy_macos.sh +++ b/cp_scripts_alchemy.sh @@ -28,7 +28,7 @@ cp scripts/*.lua $openresty_lua_scripts_dir # -- Replace scripts path in file replaced_scripts_path=$(echo $openresty_lua_scripts_dir | sed 's_/_\\/_g') echo "$replaced_scripts_path" -sed -i -e "s/\$script_path/$replaced_scripts_path/" \ +sed -i -e "s/SCRIPT_PATH/$replaced_scripts_path/" \ "$openresty_lua_scripts_dir"/combine.lua \ "$openresty_lua_scripts_dir"/convert_audio.lua \ "$openresty_lua_scripts_dir"/test_upyun_upload.lua \ diff --git a/cp_scripts_local_macos.sh b/cp_scripts_local_macos.sh index 4f9e3aa..6ff3f1f 100755 --- a/cp_scripts_local_macos.sh +++ b/cp_scripts_local_macos.sh @@ -28,7 +28,7 @@ cp scripts/*.lua $openresty_lua_scripts_dir # -- Replace scripts path in file replaced_scripts_path=$(echo $openresty_lua_scripts_dir | sed 's_/_\\/_g') echo "$replaced_scripts_path" -sed -i -e "s/\$script_path/$replaced_scripts_path/" \ +sed -i -e "s//$replaced_scripts_path/" \ "$openresty_lua_scripts_dir"/combine.lua \ "$openresty_lua_scripts_dir"/convert_audio.lua \ "$openresty_lua_scripts_dir"/test_upyun_upload.lua \ diff --git a/cp_scripts_moicen_macos.sh b/cp_scripts_moicen.sh similarity index 95% rename from cp_scripts_moicen_macos.sh rename to cp_scripts_moicen.sh index 46a80a0..7ba6376 100755 --- a/cp_scripts_moicen_macos.sh +++ b/cp_scripts_moicen.sh @@ -28,7 +28,7 @@ cp scripts/*.lua $openresty_lua_scripts_dir # -- Replace scripts path in file replaced_scripts_path=$(echo $openresty_lua_scripts_dir | sed 's_/_\\/_g') echo "$replaced_scripts_path" -sed -i -e "s/\$script_path/$replaced_scripts_path/" \ +sed -i -e "s/SCRIPT_PATH/$replaced_scripts_path/" \ "$openresty_lua_scripts_dir"/combine.lua \ "$openresty_lua_scripts_dir"/convert_audio.lua \ "$openresty_lua_scripts_dir"/test_upyun_upload.lua \ diff --git a/scripts/combine.lua b/scripts/combine.lua index d7b1984..76a9f75 100644 --- a/scripts/combine.lua +++ b/scripts/combine.lua @@ -1,6 +1,6 @@ -- 指定模块引用目录,否则无法加载同目录下的其他文件 --package.path = package.path .. ';/usr/local/opt/openresty/nginx/scripts/?.lua'; -package.path = package.path .. ';$script_path/?.lua'; +package.path = package.path .. ';/?.lua'; local uuid = require "resty.jit-uuid" local cjson = require "cjson" diff --git a/scripts/convert_audio.lua b/scripts/convert_audio.lua index b9e7c03..895655f 100644 --- a/scripts/convert_audio.lua +++ b/scripts/convert_audio.lua @@ -1,6 +1,6 @@ -- 指定模块引用目录,否则无法加载同目录下的其他文件 --package.path = package.path .. ';/usr/local/opt/openresty/nginx/scripts/?.lua'; -package.path = package.path .. ';$script_path/?.lua'; +package.path = package.path .. ';/?.lua'; local cjson = require "cjson" local uuid = require "resty.jit-uuid" diff --git a/scripts/test_upyun_upload.lua b/scripts/test_upyun_upload.lua index 1a7a135..22e13ef 100644 --- a/scripts/test_upyun_upload.lua +++ b/scripts/test_upyun_upload.lua @@ -1,6 +1,6 @@ -- 指定模块引用目录,否则无法加载同目录下的其他文件 --package.path = package.path .. ';/usr/local/opt/openresty/nginx/scripts/?.lua'; -package.path = package.path .. ';$script_path/?.lua'; +package.path = package.path .. ';/?.lua'; local yun = require("upyun") local cjson = require "cjson" diff --git a/scripts/upyun_upload.lua b/scripts/upyun_upload.lua index 0073a82..83bab91 100644 --- a/scripts/upyun_upload.lua +++ b/scripts/upyun_upload.lua @@ -1,6 +1,6 @@ -- 指定模块引用目录,否则无法加载同目录下的其他文件 --package.path = package.path .. ';/usr/local/opt/openresty/nginx/scripts/?.lua'; -package.path = package.path .. ';$script_path/?.lua'; +package.path = package.path .. ';/?.lua'; local upyun_upload = {}