summaryrefslogtreecommitdiff
path: root/librestage
diff options
context:
space:
mode:
Diffstat (limited to 'librestage')
-rwxr-xr-xlibrestage12
1 files changed, 9 insertions, 3 deletions
diff --git a/librestage b/librestage
index 6d7b45e..fa72098 100755
--- a/librestage
+++ b/librestage
@@ -64,11 +64,17 @@ source /etc/makepkg.conf
PKGDEST=${PKGDEST:-.}
SRCPKGDEST=${SRCPKGDEST:-.}
+PKGEXT=".pkg.tar.?z"
+
# Copies the packages to the specified repos inside staging
-for _arch in ${arch[@]}; do
+for _arch in ${ARCHES[@]}; do
for pkg in ${pkgname[@]}; do
- pkgfile="$pkg-$pkgver-$pkgrel-$_arch$PKGEXT"
- pkgpath="$PKGDEST/$pkgfile"
+
+ pkgpath=$(find ${PKGDEST}/ -type f -name "${pkg}-${pkgver}-${pkgrel}-${_arch}${PKGEXT}")
+
+ [[ -z ${pkgpath} ]] && continue;
+
+ pkgfile=$(basename ${pkgpath})
if [ -e "${pkgpath}" ]; then
msg "Found ${pkgfile}"