소스 검색

Update gitUpload.sh

MoeClub 1 개월 전
부모
커밋
48a90fe1db
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      gitUpload.sh

+ 1 - 2
gitUpload.sh

@@ -6,7 +6,6 @@ branch="${3:-main}"
 clone="${4:-}"
 
 [ -n "${target}" ] && [ -n "${repo}" ] || exit 1
-# [ -e "${target}" ] || exit 1
 tmp=$(mktemp -d)
 trap "rm -rf ${tmp}" EXIT
 cd "$tmp"
@@ -42,6 +41,7 @@ git pull origin "$branch"
   git checkout -b "$branch"
   git remote add clone "$clone"
   createRepo "$clone"
+  find "$tmp" -name "*.sh" |xargs sed -i "s#/${repo##https://*github.com/}#/${clone##https://*github.com/}#g"
 }
 
 [ "${target}" == "-" ] && read -p "Pause <${tmp}> ..."
@@ -52,4 +52,3 @@ git commit -m `date +'%Y%m%d%H%M%S'`
 # git config http.postBuffer 524288000
 [ -n "$clone" ] && git push clone "$branch" -f || git push origin "$branch" -f
 
-