From 14f6ff7f144441bab72b340d854a5e0f64524422 Mon Sep 17 00:00:00 2001 From: wangchong1995924 <15229716099@163.com> Date: Fri, 26 Mar 2021 18:17:07 +0800 Subject: [PATCH] fix if error --- script/tools/pkg_rpm_update.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/script/tools/pkg_rpm_update.sh b/script/tools/pkg_rpm_update.sh index b09aa14..0a7cc23 100755 --- a/script/tools/pkg_rpm_update.sh +++ b/script/tools/pkg_rpm_update.sh @@ -49,7 +49,7 @@ function copy_rpm(){ else date_dir=${up_dir} fi - if [ ${obs_proj} =~ "Epol" ];then + if [[ ${obs_proj} =~ "Epol" ]];then bak=`echo ${obs_proj%%:Epol}` branch_name=`echo ${bak//:/-}` else @@ -109,7 +109,7 @@ function release_rpm(){ release_dir=$2 update_key=$3 pkg_place=$4 - if [ ${obs_proj} =~ "Epol" ];then + if [[ ${obs_proj} =~ "Epol" ]];then bak=`echo ${obs_proj%%:Epol}` branch_name=`echo ${bak//:/-}` else @@ -164,7 +164,7 @@ function update_rpm(){ up_dir=$4 pkg_place=$5 - if [ ${obs_proj} =~ "Epol" ];then + if [[ ${obs_proj} =~ "Epol" ]];then bak=`echo ${obs_proj%%:Epol}` branch_name=`echo ${bak//:/-}` else @@ -196,7 +196,7 @@ function del_pkg_rpm(){ update_key=$4 flag=$5 pkg_place=$6 - if [ ${obs_proj} =~ "Epol" ];then + if [[ ${obs_proj} =~ "Epol" ]];then bak=`echo ${obs_proj%%:Epol}` branch_name=`echo ${bak//:/-}` else @@ -260,7 +260,7 @@ function del_update_dir(){ update_key=$3 pkg_place=$4 - if [ ${obs_proj} =~ "Epol" ];then + if [[ ${obs_proj} =~ "Epol" ]];then bak=`echo ${obs_proj%%:Epol}` branch_name=`echo ${bak//:/-}` else @@ -300,7 +300,7 @@ function check_update_rpm(){ update_dir=$2 pkg_place=$3 update_key=$4 - if [ ${obs_proj} =~ "Epol" ];then + if [[ ${obs_proj} =~ "Epol" ]];then bak=`echo ${obs_proj%%:Epol}` branch_name=`echo ${bak//:/-}` else -- Gitee