diff --git a/ChangeMirrors.sh b/ChangeMirrors.sh index dc11e55..f78b365 100755 --- a/ChangeMirrors.sh +++ b/ChangeMirrors.sh @@ -1,6 +1,6 @@ #!/bin/bash ## Author: SuperManito -## Modified: 2023-06-24 +## Modified: 2023-07-10 ## License: MIT ## GitHub: https://github.com/SuperManito/LinuxMirrors ## Website: https://linuxmirrors.cn @@ -4892,7 +4892,7 @@ function CommandOptions() { ## 指定软件源地址 --source) if [ "$2" ]; then - echo "$2" | grep -Eq "\-|\(|\)|\[|\]|\{|\}" + echo "$2" | grep -Eq "\(|\)|\[|\]|\{|\}" if [ $? -eq 0 ]; then Output_Error "检测到无效参数值 ${BLUE}$2${PLAIN} ,请输入有效的地址!" else @@ -4905,7 +4905,7 @@ function CommandOptions() { ;; --source-security) if [ "$2" ]; then - echo "$2" | grep -Eq "\-|\(|\)|\[|\]|\{|\}" + echo "$2" | grep -Eq "\(|\)|\[|\]|\{|\}" if [ $? -eq 0 ]; then Output_Error "检测到无效参数值 ${BLUE}$2${PLAIN} ,请输入有效的地址!" else @@ -4918,7 +4918,7 @@ function CommandOptions() { ;; --source-vault) if [ "$2" ]; then - echo "$2" | grep -Eq "\-|\(|\)|\[|\]|\{|\}" + echo "$2" | grep -Eq "\(|\)|\[|\]|\{|\}" if [ $? -eq 0 ]; then Output_Error "检测到无效参数值 ${BLUE}$2${PLAIN} ,请输入有效的地址!" else diff --git a/DockerInstallation.sh b/DockerInstallation.sh index 1c1940b..474a8c1 100755 --- a/DockerInstallation.sh +++ b/DockerInstallation.sh @@ -1,6 +1,6 @@ #!/bin/bash ## Author: SuperManito -## Modified: 2023-06-24 +## Modified: 2023-07-10 ## License: MIT ## GitHub: https://github.com/SuperManito/LinuxMirrors ## Website: https://linuxmirrors.cn @@ -732,7 +732,7 @@ function CommandOptions() { ## 指定 Docker CE 软件源地址 --source) if [ "$2" ]; then - echo "$2" | grep -Eq "\-|\(|\)|\[|\]|\{|\}" + echo "$2" | grep -Eq "\(|\)|\[|\]|\{|\}" if [ $? -eq 0 ]; then Output_Error "检测到无效参数值 ${BLUE}$2${PLAIN} ,请输入有效的地址!" else @@ -746,7 +746,7 @@ function CommandOptions() { ## 指定 Docker Registry 仓库地址 --source-registry) if [ "$2" ]; then - echo "$2" | grep -Eq "\-|\(|\)|\[|\]|\{|\}" + echo "$2" | grep -Eq "\(|\)|\[|\]|\{|\}" if [ $? -eq 0 ]; then Output_Error "检测到无效参数值 ${BLUE}$2${PLAIN} ,请输入有效的地址!" else