summaryrefslogtreecommitdiff
path: root/buildrepo
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-02-17 07:42:15 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-02-17 07:42:15 +0000
commit3a627d26efc751a24ac8b4ab52ed1db7f4349344 (patch)
tree89773c3efd8c489e08336462af5b8654ae2fdb8d /buildrepo
parent23b3d4a8dd11f742bfd0e3340d2ef6903e750109 (diff)
downloadabuild-3a627d26efc751a24ac8b4ab52ed1db7f4349344.tar.gz
abuild-3a627d26efc751a24ac8b4ab52ed1db7f4349344.tar.bz2
abuild-3a627d26efc751a24ac8b4ab52ed1db7f4349344.tar.xz
abuild-3a627d26efc751a24ac8b4ab52ed1db7f4349344.zip
buildrepo: purge old pkgs before generate index
and generate index if it is missing, even if all packages are up2date.
Diffstat (limited to 'buildrepo')
-rwxr-xr-xbuildrepo9
1 files changed, 6 insertions, 3 deletions
diff --git a/buildrepo b/buildrepo
index 524aaa6..b1f36cd 100755
--- a/buildrepo
+++ b/buildrepo
@@ -44,6 +44,9 @@ build() {
cd "$aportsdir/$repo" || return 1
mkdir -p "$repodir/$repo"
+ if ! [ -f "$repodir/$repo"/APK_INDEX.gz ]; then
+ indexupdate="APK_INDEX.gz"
+ fi
# first we try copy everything possible and find out which we need
# to rebuild. By doing this we might save us for rebuilding
@@ -79,6 +82,9 @@ build() {
done
fi
+ # kill old packages in repo
+ purge "$repo"
+
# generate the repository index
cd "$repodir/$repo"
echo ">>> Generating Index for $repo..."
@@ -90,9 +96,6 @@ build() {
done
apk $deps index *.apk | gzip -9 > APK_INDEX.gz
fi
-
- # kill old packages in repo
- purge "$repo"
}
while getopts "a:d:hl:pr:" opt; do