未验证 提交 71283d6c 编写于 作者: sangshuduo's avatar sangshuduo 提交者: GitHub

fix: script if share not exist (#20875)

上级 3f5f76a8
...@@ -573,16 +573,18 @@ function install_config() { ...@@ -573,16 +573,18 @@ function install_config() {
} }
function install_share_etc() { function install_share_etc() {
[ ! -d ${script_dir}/share/etc ] && return
for c in `ls ${script_dir}/share/etc/`; do for c in `ls ${script_dir}/share/etc/`; do
if [ -e /etc/$c ]; then if [ -e /etc/$c ]; then
out=/etc/$c.new.`date +%F` out=/etc/$c.new.`date +%F`
${csudo}cp -f ${script_dir}/share/etc/$c $out ${csudo}cp -f ${script_dir}/share/etc/$c $out ||:
else else
${csudo}cp -f ${script_dir}/share/etc/$c /etc/$c ${csudo}cp -f ${script_dir}/share/etc/$c /etc/$c ||:
fi fi
done done
${csudo} cp ${script_dir}/share/srv/* ${service_config_dir} [ ! -d ${script_dir}/share/srv ] && return
${csudo} cp ${script_dir}/share/srv/* ${service_config_dir} ||:
} }
function install_log() { function install_log() {
...@@ -612,7 +614,7 @@ function install_examples() { ...@@ -612,7 +614,7 @@ function install_examples() {
function install_web() { function install_web() {
if [ -d "${script_dir}/share" ]; then if [ -d "${script_dir}/share" ]; then
${csudo}cp -rf ${script_dir}/share/* ${install_main_dir}/share ${csudo}cp -rf ${script_dir}/share/* ${install_main_dir}/share > /dev/null 2>&1 ||:
fi fi
} }
......
...@@ -150,7 +150,7 @@ fi ...@@ -150,7 +150,7 @@ fi
mkdir -p ${install_dir}/bin && cp ${bin_files} ${install_dir}/bin && chmod a+x ${install_dir}/bin/* || : mkdir -p ${install_dir}/bin && cp ${bin_files} ${install_dir}/bin && chmod a+x ${install_dir}/bin/* || :
mkdir -p ${install_dir}/init.d && cp ${init_file_deb} ${install_dir}/init.d/${serverName}.deb mkdir -p ${install_dir}/init.d && cp ${init_file_deb} ${install_dir}/init.d/${serverName}.deb
mkdir -p ${install_dir}/init.d && cp ${init_file_rpm} ${install_dir}/init.d/${serverName}.rpm mkdir -p ${install_dir}/init.d && cp ${init_file_rpm} ${install_dir}/init.d/${serverName}.rpm
mkdir -p ${install_dir}/share && cp -rf ${build_dir}/share/{etc,srv} ${install_dir}/share mkdir -p ${install_dir}/share && cp -rf ${build_dir}/share/{etc,srv} ${install_dir}/share ||:
if [ $adapterName != "taosadapter" ]; then if [ $adapterName != "taosadapter" ]; then
mv ${install_dir}/cfg/${clientName2}adapter.toml ${install_dir}/cfg/$adapterName.toml mv ${install_dir}/cfg/${clientName2}adapter.toml ${install_dir}/cfg/$adapterName.toml
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册