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

修改

上级 14c90cdf
#!/bin/sh
export PYTHONPATH=/pubx/git-replace/
new_args=python /pubx/git-replace/replace_url.py "$*"
echo "$*" > /tmp/_args
python /pubx/git-replace/replace_url.py /tmp/_args /tmp/_args.new
new_args=`cat /tmp/_args.new`
# $* : -c advice.detachedHead=false clone --depth 1 --branch main https://github.com/frida/glib.git glib
# new_args : -c advice.detachedHead=false clone --depth 1 --branch main git@gitcode.net/dependency/frida/glib.git glib
......
#!/bin/sh
#runme: sudo apt reinstall git ; sh -x install.sh
#source /miniconda3/bin/activate;
#runme: sudo apt reinstall git ; sh -x install.sh; sh -x /usr/bin/git clone https://github.com/abseil/abseil-cpp.git /tmp/abseil-cpp
fpGitOriginal=`which git.original`
#if has git.original then calc file size
......
......@@ -19,6 +19,14 @@ def processWordK(wordK:str)->str:
else:
return wordK
new_list:List[str]=list(map(lambda wordK:processWordK(wordK), sys.argv[1:]))
print(f"{sys.argv}")
ifp_args=sys.argv[1]
ofp_args=sys.argv[2]
i_args:str=None
with open(ifp_args, "r",encoding="utf8") as if_args:
i_args=if_args.read()
new_list:List[str]=list(map(lambda wordK:processWordK(wordK), i_args))
new_arg:str=" ".join(new_list)
print(new_arg)
with open(ofp_args, "w",encoding="utf8") as of_args:
of_args.write(new_arg)
print(f"{ifp_args},{ofp_args},{i_args},{new_arg}")
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册