diff --git a/git_template b/git_template index b5a00510208c796660149e14bc54afac8df22f83..93f05dfe0393bfc4f613cbaffecaefaebdf1a7f4 100644 --- a/git_template +++ b/git_template @@ -11,9 +11,13 @@ new_args=`cat /tmp/_args.new` echo "pwd:`pwd`; /usr/bin/git.original $new_args" >> /tmp/git.log /usr/bin/git.original $new_args -#如果含有clone, 才会检查子模块 -if [[ $new_args = *" clone "* ]]; then +#如果不含clone, 则处理完毕了 +if [ "${new_args/ clone //}" == "${new_args}" ]; then +#echo "not clone cmd,exit" +exit 0 +fi +#含有clone, 才会检查子模块 #git clone https://github.com/frida/libpsl.git #python -c 's="-c advice.detachedHead=false clone --depth 1 --branch main https://github.com/frida/glib.git glib"; s.replace(" "," "); print(s.split(" ")[-1])' @@ -22,6 +26,5 @@ git_dir="`pwd`/$git_dir_name" gitmodules_path=${git_dir}/.gitmodules test -f ${gitmodules_path} && python /pubx/git-replace/replace_gitmodules_url.py ${gitmodules_path} -fi -echo ok #这句并不是废话, 是为了使得本脚本的退出值为正常0 +echo ok > /dev/null #这句并不是废话, 是为了使得本脚本的退出值为正常0