提交 d9d9d5ab 编写于 作者: P prgrmz01@163.com

如果含有clone, 才会检查子模块

上级 affa821d
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册