diff options
-rwxr-xr-x | cron-jobs/sourceballs | 5 | ||||
-rw-r--r-- | db-functions | 20 |
2 files changed, 9 insertions, 16 deletions
diff --git a/cron-jobs/sourceballs b/cron-jobs/sourceballs index 53d43ce..ee074bd 100755 --- a/cron-jobs/sourceballs +++ b/cron-jobs/sourceballs @@ -59,7 +59,7 @@ for repo in ${PKGREPOS[@]}; do pkgarch=${pkginfo[2]} pkglicense=(${pkginfo[@]:3}) - # Should this package be skipped? + # Should this packages be skipped? if grep -Fqx "${pkgbase}" "${dirname}/sourceballs.skip"; then continue fi @@ -82,6 +82,9 @@ for repo in ${PKGREPOS[@]}; do mkdir -p "${WORKDIR}/pkgbuilds/${repo}-${pkgarch}" #svn export -q "${SVNREPO}/${pkgbase}/repos/${repo}-${pkgarch}" \ # "${WORKDIR}/pkgbuilds/${repo}-${pkgarch}/${pkgbase}" >/dev/null 2>&1 + + # If it's on official repos, nor [libre], nor [libre-testing] + cp -r "${SVNREPO}/$repo/${pkgbase}" "${WORKDIR}/pkgbuilds/${repo}-${pkgarch}/" >/dev/null 2>&1 || \ cp -r "${SVNREPO}/libre/${pkgbase}" "${WORKDIR}/pkgbuilds/${repo}-${pkgarch}/" >/dev/null 2>&1 || \ cp -r "${SVNREPO}/libre-testing/${pkgbase}" "${WORKDIR}/pkgbuilds/${repo}-${pkgarch}/" >/dev/null 2>&1 if [ $? -ge 1 ]; then diff --git a/db-functions b/db-functions index e790fb6..e2731cb 100644 --- a/db-functions +++ b/db-functions @@ -1,5 +1,7 @@ #!/bin/bash +. config + # Some PKGBUILDs need CARCH to be set CARCH="x86_64" @@ -16,7 +18,7 @@ restore_umask () { } # set up general environment -WORKDIR=$(mktemp -d /home/parabolavnx/tmp/$(basename $0).XXXXXXXXXX) +WORKDIR=$(mktemp -d ${TMPDIR}/$(basename $0).XXXXXXXXXX) LOCKS=() # check if messages are to be printed using color @@ -359,26 +361,14 @@ check_splitpkgs() { if [ ! -f "${WORKDIR}/pkgbuilds/${repo}-${_pkgarch}/${_pkgbase}" ]; then mkdir -p "${WORKDIR}/pkgbuilds/${repo}-${_pkgarch}" -# Decide whether to look for PKGBUILD on [libre] or [libre-testing] - case $repo in - testing) - altrepo=libre-testing - ;; - *) - altrepo=libre - ;; - esac - cp -r ${SVNREPO}/$repo/$_pkgbase/PKGBUILD "${WORKDIR}/pkgbuilds/${repo}-${_pkgarch}/${_pkgbase}" >/dev/null 2>&1 || \ - cp -r ${SVNREPO}/$altrepo/$_pkgbase/PKGBUILD "${WORKDIR}/pkgbuilds/${repo}-${_pkgarch}/$_pkgbase">/dev/null 2>&1 + cp -r ${SVNREPO}/libre/$_pkgbase/PKGBUILD "${WORKDIR}/pkgbuilds/${repo}-${_pkgarch}/${_pkgbase}" >/dev/null 2>&1 || \ + cp -r ${SVNREPO}/libre-testing/$_pkgbase/PKGBUILD "${WORKDIR}/pkgbuilds/${repo}-${_pkgarch}/$_pkgbase">/dev/null 2>&1 [[ $? -ge 1 ]] && { echo "Failed $_pkgbase-$_pkgver-$_pkgarch" return 1 } - - sleep 20s - fi local svnnames=($(. "${WORKDIR}/pkgbuilds/${repo}-${_pkgarch}/${_pkgbase}"; echo ${pkgname[@]})) |