mirror of
https://github.com/xopenwrt/X-OpenWrt-New.git
synced 2026-09-18 08:20:11 +00:00
Github don't support svn, so use git sim svn
This commit is contained in:
@@ -425,6 +425,8 @@ AddPackage() {
|
||||
PKG_NAME=$3
|
||||
REPO_URL="https://github.com/$4"
|
||||
REPO_BRANCH=$5
|
||||
SVN_REPO_NAME=$6
|
||||
SVN_REPO_DIR=$7
|
||||
[[ ${REPO_URL} =~ "${OP_AUTHOR}/${OP_REPO}" ]] && return 0
|
||||
|
||||
MKDIR ${PKG_DIR}
|
||||
@@ -445,7 +447,11 @@ AddPackage() {
|
||||
git clone -b ${REPO_BRANCH} ${PKG_URL} ${PKG_NAME} --depth=1 > /dev/null 2>&1
|
||||
;;
|
||||
svn)
|
||||
svn checkout ${REPO_URL}/${PKG_NAME} ${PKG_NAME} > /dev/null 2>&1
|
||||
SVN_REPO_URL="$(echo ${REPO_URL}/${SVN_REPO_NAME} | sed s/[[:space:]]//g)"
|
||||
git clone -b ${REPO_BRANCH} ${SVN_REPO_URL} --depth 1 --single-branch > /dev/null 2>&1
|
||||
cp ${SVN_REPO_NAME}/${SVN_REPO_DIR}/${PKG_NAME} ${PKG_NAME} -r
|
||||
rm ${SVN_REPO_NAME} -rf
|
||||
# svn checkout ${REPO_URL}/${PKG_NAME} ${PKG_NAME} > /dev/null 2>&1
|
||||
;;
|
||||
esac
|
||||
if [[ -f ${PKG_NAME}/Makefile || -n $(ls -A ${PKG_NAME}) ]]
|
||||
|
||||
Reference in New Issue
Block a user