diff options
Diffstat (limited to 'db-update')
-rwxr-xr-x | db-update | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -9,9 +9,9 @@ if [ $# -ge 1 ]; then fi # Find repos with packages to release -staging_repos=($(find "${STAGING}" -mindepth 1 -type f -name "*${PKGEXT}" -printf '%h\n' | sort -u)) +staging_repos=($(find "${staging_directory}" -mindepth 1 -type f -name "*${package_extension_suffixfile}" -printf '%h\n' | sort -u)) if [ $? -ge 1 ]; then - die "Could not read %s" "${STAGING}" + die "Could not read %s" "${staging_directory}" fi repos=() @@ -33,7 +33,7 @@ for repo in "${repos[@]}"; do if ! check_repo_permission "${repo}"; then die "You don't have permission to update packages in %s" "${repo}" fi - pkgs=($(getpkgfiles "${STAGING}/${repo}/"*${PKGEXT})) + pkgs=($(getpkgfiles "${staging_directory}/${repo}/"*${package_extension_suffixfile})) if [ $? -eq 0 ]; then for pkg in "${pkgs[@]}"; do if [ -h "${pkg}" ]; then @@ -51,18 +51,18 @@ for repo in "${repos[@]}"; do # die "Missing split packages for %s" "${repo}" #fi else - die "Could not read %s" "${STAGING}" + die "Could not read %s" "${staging_directory}" fi done dirs=() for repo in "${repos[@]}"; do msg "Updating [%s]..." "${repo}" - any_pkgs=($(getpkgfiles "${STAGING}/${repo}/"*-any${PKGEXT} 2>/dev/null)) + any_pkgs=($(getpkgfiles "${staging_directory}/${repo}/"*-any${package_extension_suffixfile} 2>/dev/null)) for pkgarch in "${ARCHES[@]}"; do add_dirs=() add_pkgs=() - arch_pkgs=($(getpkgfiles "${STAGING}/${repo}/"*-"${pkgarch}"${PKGEXT} 2>/dev/null)) + arch_pkgs=($(getpkgfiles "${staging_directory}/${repo}/"*-"${pkgarch}"${package_extension_suffixfile} 2>/dev/null)) for pkg in "${arch_pkgs[@]}" "${any_pkgs[@]}"; do pkgfile="${pkg##*/}" msg2 "%s (%s)" "${pkgfile}" "${pkgarch}" @@ -78,7 +78,7 @@ for repo in "${repos[@]}"; do if [ -f "${root_dir}/${PKGPOOL}/${pkgfile}.sig" ]; then ln -s "../../../${PKGPOOL}/${pkgfile}.sig" "${root_dir}/$repo/os/${pkgarch}" fi - add_dirs+=("${STAGING}/abslibre/$(getpkgarch "${root_dir}/$PKGPOOL/$pkgfile")/$repo/$(getpkgbase "${root_dir}/$PKGPOOL/$pkgfile")") + add_dirs+=("${staging_directory}/abslibre/$(getpkgarch "${root_dir}/$PKGPOOL/$pkgfile")/$repo/$(getpkgbase "${root_dir}/$PKGPOOL/$pkgfile")") add_pkgs+=("${pkgfile}") done for add_dir in "${add_dirs[@]}"; do @@ -98,12 +98,12 @@ for repo in "${repos[@]}"; do done done -cd "${STAGING}" +cd "${staging_directory}" # Remove left over XBS files rm -rf -- "${dirs[@]}" dirname -z -- "${dirs[@]}" | - xargs -0 realpath -zm --relative-to="${STAGING}" -- | + xargs -0 realpath -zm --relative-to="${staging_directory}" -- | xargs -0 rmdir -p -- 2>/dev/null # Stage generated source files |