diff options
Diffstat (limited to 'cron-jobs/sourceballs')
-rwxr-xr-x | cron-jobs/sourceballs | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/cron-jobs/sourceballs b/cron-jobs/sourceballs index 38104c7..7df349c 100755 --- a/cron-jobs/sourceballs +++ b/cron-jobs/sourceballs @@ -21,10 +21,10 @@ renice +10 -p $$ > /dev/null for repo in "${PKGREPOS[@]}"; do for arch in "${ARCHES[@]}"; do # Repo does not exist; skip it - if [ ! -f "${root_dir}/${repo}/os/${arch}/${repo}${DBEXT}" ]; then + if [ ! -f "${root_dir}/${repo}/os/${arch}/${repo}${database_extension_suffixfile}" ]; then continue fi - bsdtar -xOf "${root_dir}/${repo}/os/${arch}/${repo}${DBEXT}" \ + bsdtar -xOf "${root_dir}/${repo}/os/${arch}/${repo}${database_extension_suffixfile}" \ | awk '/^%NAME%/ { getline b }; /^%BASE%/ { getline b }; /^%VERSION%/ { getline v }; @@ -46,7 +46,7 @@ for repo in "${PKGREPOS[@]}"; do done # Create a list of all available source package file names -find "${root_dir}/${SRCPOOL}" -xtype f -name "*${SRCEXT}" -printf '%f\n' | sort -u > "${WORKDIR}/available-src-pkgs" +find "${root_dir}/${SRCPOOL}" -xtype f -name "*${source_extension_suffixfile}" -printf '%f\n' | sort -u > "${WORKDIR}/available-src-pkgs" # Check for all packages if we need to build a source package for repo in "${PKGREPOS[@]}"; do @@ -69,12 +69,12 @@ for repo in "${PKGREPOS[@]}"; do # continue # fi # Store the expected file name of the source package - echo "${pkgbase}-${pkgver}${SRCEXT}" >> "${WORKDIR}/expected-src-pkgs" + echo "${pkgbase}-${pkgver}${source_extension_suffixfile}" >> "${WORKDIR}/expected-src-pkgs" # Build the source package if its not already there - if ! grep -Fqx "${pkgbase}-${pkgver}${SRCEXT}" "${WORKDIR}/available-src-pkgs"; then + if ! grep -Fqx "${pkgbase}-${pkgver}${source_extension_suffixfile}" "${WORKDIR}/available-src-pkgs"; then # Check if we had failed before - if in_array "${pkgbase}-${pkgver}${SRCEXT}" "${failedpkgs[@]}"; then + if in_array "${pkgbase}-${pkgver}${source_extension_suffixfile}" "${failedpkgs[@]}"; then continue fi @@ -83,20 +83,20 @@ for repo in "${PKGREPOS[@]}"; do cp -a "$(xbs releasepath "${pkgbase}" "${repo}" "${pkgarch}")" \ "${WORKDIR}/pkgbuilds/${repo}-${pkgarch}/${pkgbase}" >/dev/null 2>&1 if [ $? -ge 1 ]; then - failedpkgs+=("${pkgbase}-${pkgver}${SRCEXT}") + failedpkgs+=("${pkgbase}-${pkgver}${source_extension_suffixfile}") continue fi # Build the actual source package pushd "${WORKDIR}/pkgbuilds/${repo}-${pkgarch}/${pkgbase}" >/dev/null SRCPKGDEST=. makepkg --nocolor --allsource --ignorearch --skippgpcheck >"${WORKDIR}/${pkgbase}.log" 2>&1 - if [ $? -eq 0 ] && [ -f "${pkgbase}-${pkgver}${SRCEXT}" ]; then - mv_acl "${pkgbase}-${pkgver}${SRCEXT}" "${root_dir}/${SRCPOOL}/${pkgbase}-${pkgver}${SRCEXT}" + if [ $? -eq 0 ] && [ -f "${pkgbase}-${pkgver}${source_extension_suffixfile}" ]; then + mv_acl "${pkgbase}-${pkgver}${source_extension_suffixfile}" "${root_dir}/${SRCPOOL}/${pkgbase}-${pkgver}${source_extension_suffixfile}" # Avoid creating the same source package for every arch - echo "${pkgbase}-${pkgver}${SRCEXT}" >> "${WORKDIR}/available-src-pkgs" - newpkgs+=("${pkgbase}-${pkgver}${SRCEXT}") + echo "${pkgbase}-${pkgver}${source_extension_suffixfile}" >> "${WORKDIR}/available-src-pkgs" + newpkgs+=("${pkgbase}-${pkgver}${source_extension_suffixfile}") else - failedpkgs+=("${pkgbase}-${pkgver}${SRCEXT}") + failedpkgs+=("${pkgbase}-${pkgver}${source_extension_suffixfile}") cat "${WORKDIR}/${pkgbase}.log" >> "${WORKDIR}/makepkg-fail.log" fi popd >/dev/null @@ -124,22 +124,22 @@ old_pkgs=($(comm -23 "${WORKDIR}/available-src-pkgs.sort" "${WORKDIR}/expected-s if [ ${#old_pkgs[@]} -ge 1 ]; then msg "Removing old source packages..." - "${SOURCE_CLEANUP_DRYRUN}" && warning 'dry run mode is active' + "${source_cleanup_dryrun}" && warning 'dry run mode is active' for old_pkg in "${old_pkgs[@]}"; do msg2 '%s' "${old_pkg}" - if ! "${SOURCE_CLEANUP_DRYRUN}"; then - mv_acl "${root_dir}/${SRCPOOL}/${old_pkg}" "${SOURCE_CLEANUP_DESTDIR}/${old_pkg}" - touch "${SOURCE_CLEANUP_DESTDIR}/${old_pkg}" + if ! "${source_cleanup_dryrun}"; then + mv_acl "${root_dir}/${SRCPOOL}/${old_pkg}" "${source_cleanup_destination_directory}/${old_pkg}" + touch "${source_cleanup_destination_directory}/${old_pkg}" fi done fi -old_pkgs=($(find "${SOURCE_CLEANUP_DESTDIR}" -type f -name "*${SRCEXT}" -mtime +"${SOURCE_CLEANUP_KEEP}" -printf '%f\n')) +old_pkgs=($(find "${source_cleanup_destination_directory}" -type f -name "*${source_extension_suffixfile}" -mtime +"${source_cleanup_keep}" -printf '%f\n')) if [ ${#old_pkgs[@]} -ge 1 ]; then msg "Removing old source packages from the cleanup directory..." for old_pkg in "${old_pkgs[@]}"; do msg2 '%s' "${old_pkg}" - "${SOURCE_CLEANUP_DRYRUN}" || rm -f "${SOURCE_CLEANUP_DESTDIR}/${old_pkg}" + "${source_cleanup_dryrun}" || rm -f "${source_cleanup_destination_directory}/${old_pkg}" done fi |