Commit f197c51d authored by Natanael Copa's avatar Natanael Copa

buildrepo: speed up by avoiding forks

parent ef25c6cf
...@@ -53,12 +53,24 @@ build() { ...@@ -53,12 +53,24 @@ build() {
[ -f "$aportsdir/$repo/$i" ] || continue [ -f "$aportsdir/$repo/$i" ] || continue
export REPODEST="$repodir" export REPODEST="$repodir"
cd "$aportsdir/$repo"/${i%/*} || return 1 cd "$aportsdir/$repo"/${i%/*} || return 1
if abuild -k -q up2date 2>/dev/null; then pkgname=
pkgver=
pkgrel=
subpackages=
. ./APKBUILD
pkgs=
for subpkg in $pkgname $subpackages; do
pkgfile=${subpkg%:*}-$pkgver-r$pkgrel.apk
if ! [ -f "$REPODEST/$repo/$CARCH/$pkgfile" ]; then
pkgs="$pkgs $pkgfile"
fi
done
if [ -z "$pkgs" ]; then
continue continue
fi fi
# try link or copy the files if they are in the ports dir # try link or copy the files if they are in the ports dir
pkgs=$(abuild listpkg)
if all_exist $pkgs; then if all_exist $pkgs; then
echo ">>> Copying " $pkgs echo ">>> Copying " $pkgs
cp -p -l $pkgs "$repodir/$repo/$arch"/ 2>/dev/null \ cp -p -l $pkgs "$repodir/$repo/$arch"/ 2>/dev/null \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment