From f6896bdb28aec50965d1c8ccae1280d4d6521bd4 Mon Sep 17 00:00:00 2001 From: lsy Date: Thu, 26 Sep 2024 15:46:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=BD=AF=E4=BB=B6=E7=BB=93?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Config/Docker/image.sh | 2 +- Run.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Config/Docker/image.sh b/Config/Docker/image.sh index 4b77560..cf12657 100644 --- a/Config/Docker/image.sh +++ b/Config/Docker/image.sh @@ -11,7 +11,7 @@ case $pick in docker ps --format "{{.Names}}" ;; '2') - declare -a deocker_arr=($(docker ps --format "{{.Names}}")) + declare -a deocker_arr=($(docker ps --format "{{.Names}}" | cut -d ' ' -f1)) declare deocker_number=0 for i in "${!deocker_arr[@]}" ; do deocker_number=$(( deocker_number+1 )) diff --git a/Run.sh b/Run.sh index 14e76a2..5e21a47 100644 --- a/Run.sh +++ b/Run.sh @@ -49,8 +49,8 @@ if [[ "${pick}" =~ [1-${#pick_array[*]}] ]];then clear if [[ -d "${path_local}/${pick_array[$pick]}" ]]; then path_local="${path_local}/${pick_array[$pick]}" - elif [[ -e "${path_script}/${pick_array[$pick]}.sh" ]]; then - bash "${path_script}/${pick_array[$pick]}.sh" + elif [[ -e "${path_local}/${pick_array[$pick]}.sh" ]]; then + bash "${path_local}/${pick_array[$pick]}.sh" path_local=$path_script fi else