From 7efb407453cc83e53cdfd79a682ccc83e3a432f2 Mon Sep 17 00:00:00 2001 From: zhangsz Date: Fri, 21 Feb 2025 20:06:04 +0800 Subject: [PATCH] fix: cp205 --- bin/cpto205.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/bin/cpto205.sh b/bin/cpto205.sh index 40cc0c5..981ff36 100755 --- a/bin/cpto205.sh +++ b/bin/cpto205.sh @@ -1,16 +1,19 @@ #!/bin/bash -git_root_dir=$(dirname $(dirname $(dirname $(realpath $0)))) +git_root_dir=$(dirname $(realpath $0)/../../..) build_root_dir=${git_root_dir}/build.wfc build_doc_dir=${build_root_dir}/docs/03-configuration local_tars_rel_dir=${build_root_dir}/release/tars -tars_rel_dir_205=/mnt/public/release/omc/wfc/tars/ +local_debs_rel_dir=${build_root_dir}/release/debs +wfc_rel_dir_205=/mnt/public/release/omc/wfc +tars_rel_dir_205=${wfc_rel_dir_205}/tars/ +debs_rel_dir_205=${wfc_rel_dir_205}/debs/ server_ip_205=192.168.1.205 rel_date=$(date +%Y%m%d) passwd=admin123 usage() { - echo "Usage: sh cpto205.sh {rel_date}" + echo "Usage: sh cpto205.sh {rel_date} (format: YYYYMMDD)" exit 1 } @@ -19,16 +22,19 @@ if [ ! -z "$1" ]; then fi quickstart_file=${build_doc_dir}/03-wfc-quickstart.pdf -latest_file=$(ls -t ${local_tars_rel_dir}/*${rel_date}* 2>/dev/null | head -n 1) +latest_tar_file=$(ls -t ${local_tars_rel_dir}/*${rel_date}* 2>/dev/null | head -n 1) +latest_deb_file=$(ls -t ${local_debs_rel_dir}/*${rel_date}* 2>/dev/null | head -n 1) -# 使用expect自动回答yes和输入密码 +# Use expect to automatically answer yes and input password expect <