config/path: don't copy .git and .svn dirs when using file:///SOMEDIR

packages can override that by setting PKG_TAR_COPY_OPTS. If this
is set to an empty value everything will be copied.
This commit is contained in:
Matthias Reichl 2018-03-01 13:57:24 +01:00 committed by MilhouseVH
parent 6d07b46e97
commit 745c15f209

View File

@ -102,6 +102,8 @@ if [ -n "$PKG_URL" -a -z "$PKG_SOURCE_NAME" ]; then
PKG_SOURCE_NAME=${PKG_NAME}-${PKG_VERSION}
elif [[ ${PKG_URL} =~ ^file:// ]]; then
PKG_SOURCE_NAME=${PKG_URL#file://}
# if no specific PKG_TAR_COPY_OPTS then default to excluding .git and .svn as they can be huge
[ -z "${PKG_TAR_COPY_OPTS+x}" ] && PKG_TAR_COPY_OPTS="--exclude=.git --exclude=.svn"
else
PKG_SOURCE_NAME="${PKG_URL##*/}"
case $PKG_SOURCE_NAME in