summaryrefslogtreecommitdiff
path: root/src/abslibre-tools
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-06-20 20:50:32 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-06-20 20:50:32 -0400
commit58247a8f992a7c5957292d95fe6919b3fcacbf87 (patch)
tree8810c52e9bdc1b611f5615cf7834324f9700bfdf /src/abslibre-tools
parente4d192389ad7239861db702af4bab7a1ce8162bd (diff)
parent6c562c3a3f51c2372daef8b5a942970b739221ed (diff)
Merge branch 'master' into lukeshu/xbs
Diffstat (limited to 'src/abslibre-tools')
-rwxr-xr-xsrc/abslibre-tools/librestage15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/abslibre-tools/librestage b/src/abslibre-tools/librestage
index d566fa9..63561f7 100755
--- a/src/abslibre-tools/librestage
+++ b/src/abslibre-tools/librestage
@@ -74,25 +74,20 @@ main() {
'Waiting for a shared lock on the staging directory'
for CARCH in "${ARCHES[@]}" any; do
for _pkgname in "${pkgname[@]}"; do
- pkgfile=${_pkgname}-$(get_full_version $_pkgname)-${CARCH}${PKGEXT}
- pkgpath="$(find . "${PKGDEST:-.}" -maxdepth 1 -type f -name "$pkgfile"|sed 1q)"
-
- if [[ ! -f "${pkgpath}" ]]; then
+ if ! pkgfile=$(find_cached_package "$_pkgname" "$(get_full_version "$_pkgname")" "$CARCH"); then
continue
- else
- pkgpath="$(readlink -f "$pkgpath")"
fi
- msg 'Found package: %s' "${pkgfile}"
+ msg 'Found package: %s' "${pkgfile##*/}"
canonical="" # is empty for the first iteration, set after that
for repo in "${repos[@]}"; do
mkdir -p "${WORKDIR}/staging/${repo}"
if [[ -z $canonical ]]; then
- canonical="${WORKDIR}/staging/${repo}/${pkgfile}"
- cmd=(cp "$pkgpath" "$canonical")
+ canonical="${WORKDIR}/staging/${repo}/${pkgfile##*/}"
+ cmd=(cp "$pkgfile" "$canonical")
else
- cmd=(ln "$canonical" "${WORKDIR}/staging/${repo}/${pkgfile}")
+ cmd=(ln "$canonical" "${WORKDIR}/staging/${repo}/${pkgfile##*/}")
fi
if "${cmd[@]}"; then
msg2 "%s staged on [%s]" "$_pkgname" "$repo"