From aae61239bdf5526c82e83c735c3564264c2cc9b8 Mon Sep 17 00:00:00 2001 From: "PC-202302260912\\Administrator" <1769111741@qq.com> Date: Thu, 27 Jul 2023 15:06:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- function/function.sh | 4 ++-- ssh-copy-id.sh | 2 +- update_delivery.sh | 4 ++-- update_login.sh | 2 +- update_sensitive.sh | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/function/function.sh b/function/function.sh index 7920e3e..b35d512 100644 --- a/function/function.sh +++ b/function/function.sh @@ -3,8 +3,8 @@ source ../main.sh show_file(){ - filer=$1 - ls /data/update/$filer/ | tr ' ' '\n' + filer=$1 + find /data/update/$filer -type f -printf "%f\t%Tc\n" } # 判断一个字符串是否是合法的IP地址 diff --git a/ssh-copy-id.sh b/ssh-copy-id.sh index 8158a58..25b7557 100644 --- a/ssh-copy-id.sh +++ b/ssh-copy-id.sh @@ -4,7 +4,7 @@ servers=("server1" "server2" "server3") # 本地计算机的SSH公钥路径 -local_public_key="~/.ssh/id_rsa.pub" +local_public_key="$HOME/.ssh/id_rsa.pub" # 远程主机的用户名和密码 remote_user="root" diff --git a/update_delivery.sh b/update_delivery.sh index 5487f60..6270f39 100644 --- a/update_delivery.sh +++ b/update_delivery.sh @@ -15,11 +15,11 @@ ip=$1 BASE_DIR="/data/update/project/miduo_pay" if [ ! -d ${BASE_DIR} ]; then - echo "your input ${branch} Branch does not exist!" + echo "your input ${BASE_DIR} Branch does not exist!" exit 7 fi -cd ${BASE_DIR}/ +cd ${BASE_DIR}/ || exit git pull diff --git a/update_login.sh b/update_login.sh index c285428..4f15721 100644 --- a/update_login.sh +++ b/update_login.sh @@ -8,7 +8,7 @@ # Description: ######################################################################### ip=$1 -cd /data/update/project/miduo_login/ +cd /data/update/project/miduo_login/ || exit git pull ./gradlew clean ./gradlew build diff --git a/update_sensitive.sh b/update_sensitive.sh index 8dbd7ca..834a8ad 100644 --- a/update_sensitive.sh +++ b/update_sensitive.sh @@ -4,7 +4,7 @@ BASE_DIR="/data/update/project/sensitiveWordFilter" ip=$1 #java -cd ${BASE_DIR}/ +cd ${BASE_DIR}/ || exit #git checkout $branch git pull