소스 검색

Link without subdir

Willy-JL 1 년 전
부모
커밋
8c44b5bc33
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      .utils/add-subtree.sh

+ 1 - 1
.utils/add-subtree.sh

@@ -14,7 +14,7 @@ fi
 path="${1%/}"
 repo="${2%/}"
 if [ "$3" = "" ]; then
-    read repo branch subdir <<< "$(sed -E "s|(https?://[^/]+)/([^/]+)/([^/]+)/(tree\|blob)/([^/]+)/(.*)|\1/\2/\3 \5 \6|" <<< "${repo}")"
+    read repo branch subdir <<< "$(sed -E "s|(https?://[^/]+)/([^/]+)/([^/]+)/(tree\|blob)/([^/]+)/?(.*)|\1/\2/\3 \5 \6|" <<< "${repo}")"
 else
     branch="${3}"
     subdir="${4%/}"