diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-04-07 06:05:05 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-04-07 06:05:05 +0000 |
commit | 5acc501d8b31d8f939013de6bf2e49d844ab39a5 (patch) | |
tree | 9ccf3262227db5c550d92405de759deac52b0226 /buildrepo.in | |
parent | 9054ea713d4ddc15cfb847ec6c8b0097f2e5327f (diff) | |
download | abuild-5acc501d8b31d8f939013de6bf2e49d844ab39a5.tar.gz abuild-5acc501d8b31d8f939013de6bf2e49d844ab39a5.tar.bz2 abuild-5acc501d8b31d8f939013de6bf2e49d844ab39a5.tar.xz abuild-5acc501d8b31d8f939013de6bf2e49d844ab39a5.zip |
buildrepo: fixes for new $repo/$arch layout
Diffstat (limited to 'buildrepo.in')
-rwxr-xr-x | buildrepo.in | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/buildrepo.in b/buildrepo.in index 0fb7c12..5a80b0b 100755 --- a/buildrepo.in +++ b/buildrepo.in @@ -5,6 +5,11 @@ program=${0##*/} aportsdir=${APORTSDIR:-$HOME/aports} repodir=${REPODIR:-$HOME/packages} +machine=$(uname -m) +case $machine in + i[3-9]86) arch=x86;; + *) arch=$machine;; +esac usage() { echo "usage: $program [-a APORTSDIR] [-d REPODIR] [-hp] [-l LOGPREFIX ]" @@ -56,8 +61,8 @@ build() { pkgs=$(abuild listpkg) if all_exist $pkgs; then echo ">>> Copying " $pkgs - cp -p -l $pkgs "$repodir/$repo"/ 2>/dev/null \ - || cp -p $pkgs "$repodir/$repo"/ \ + cp -p -l $pkgs "$repodir/$repo/$CARCH"/ 2>/dev/null \ + || cp -p $pkgs "$repodir/$repo/$CARCH"/ \ || needbuild="$needbuild $i" else needbuild="$needbuild $i" @@ -88,7 +93,7 @@ build() { # generate the repository index echo ">>> Generating Index for $repo..." - cd "$repodir/$repo" + cd "$repodir/$repo/$arch" local deps for i in $deprepo; do deps="--repo $repodir/$i" @@ -98,7 +103,7 @@ build() { oldindex="--index APKINDEX.tar.gz" fi tmpindex=$(mktemp).tar.gz - apk index $oldindex -o $tmpindex \ + apk index --rewrite-arch $arch $oldindex -o $tmpindex \ --description "$repo $(cd $aportsdir && git describe)" \ *.apk abuild-sign $tmpindex && mv $tmpindex APKINDEX.tar.gz |