Unverified Commit 37a493d3 authored by Eli Schwartz's avatar Eli Schwartz
Browse files

Factor out the exporting of files/folders from svn.

As of the source_pkgbuild rewrite, this is only ever done once.
parent d6b48bd6
......@@ -79,8 +79,7 @@ for repo in "${PKGREPOS[@]}"; do
# Get the sources from svn
mkdir -p -m0770 "${WORKDIR}/pkgbuilds/${repo}-${pkgarch}"
arch_svn export -q "${SVNREPO}/${pkgbase}/repos/${repo}-${pkgarch}" \
"${WORKDIR}/pkgbuilds/${repo}-${pkgarch}/${pkgbase}" >/dev/null 2>&1
export_from_vcs "${pkgbase}" "repos/${repo}-${pkgarch}" "" "${WORKDIR}/pkgbuilds/${repo}-${pkgarch}/${pkgbase}"
if (( $? >= 1 )); then
......@@ -25,3 +25,18 @@ source_pkgbuild() {
. <(arch_svn cat "${SVNREPO}/${pkgbase}/${tag}/PKGBUILD" 2>/dev/null || echo "false")
# Export PKGBUILD resource(s) from the package's git/svn/whatever repo.
# Depending on how the VCS is used the tag might be "trunk" or "repos/$repo-$arch"
# or the full package version (epoch:pkgver-pkgrel) or any other recognized tag.
export_from_vcs() {
local pkgbase=${1}
local tag=${2}
local src=${3}
local dest=${4}
if [[ ! -e ${dest} ]]; then
mkdir -p "${dest%/?*}"
arch_svn export -q "${SVNREPO}/${pkgbase}/${tag}/${src}" "${dest}" 2>/dev/null
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment