This commit is contained in:
SuperManito
2023-07-10 02:47:51 +08:00
parent c1a9ecc9e1
commit 884d573f60
2 changed files with 7 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
## Author: SuperManito ## Author: SuperManito
## Modified: 2023-06-24 ## Modified: 2023-07-10
## License: MIT ## License: MIT
## GitHub: https://github.com/SuperManito/LinuxMirrors ## GitHub: https://github.com/SuperManito/LinuxMirrors
## Website: https://linuxmirrors.cn ## Website: https://linuxmirrors.cn
@@ -4892,7 +4892,7 @@ function CommandOptions() {
## 指定软件源地址 ## 指定软件源地址
--source) --source)
if [ "$2" ]; then if [ "$2" ]; then
echo "$2" | grep -Eq "\-|\(|\)|\[|\]|\{|\}" echo "$2" | grep -Eq "\(|\)|\[|\]|\{|\}"
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
Output_Error "检测到无效参数值 ${BLUE}$2${PLAIN} ,请输入有效的地址!" Output_Error "检测到无效参数值 ${BLUE}$2${PLAIN} ,请输入有效的地址!"
else else
@@ -4905,7 +4905,7 @@ function CommandOptions() {
;; ;;
--source-security) --source-security)
if [ "$2" ]; then if [ "$2" ]; then
echo "$2" | grep -Eq "\-|\(|\)|\[|\]|\{|\}" echo "$2" | grep -Eq "\(|\)|\[|\]|\{|\}"
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
Output_Error "检测到无效参数值 ${BLUE}$2${PLAIN} ,请输入有效的地址!" Output_Error "检测到无效参数值 ${BLUE}$2${PLAIN} ,请输入有效的地址!"
else else
@@ -4918,7 +4918,7 @@ function CommandOptions() {
;; ;;
--source-vault) --source-vault)
if [ "$2" ]; then if [ "$2" ]; then
echo "$2" | grep -Eq "\-|\(|\)|\[|\]|\{|\}" echo "$2" | grep -Eq "\(|\)|\[|\]|\{|\}"
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
Output_Error "检测到无效参数值 ${BLUE}$2${PLAIN} ,请输入有效的地址!" Output_Error "检测到无效参数值 ${BLUE}$2${PLAIN} ,请输入有效的地址!"
else else

View File

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