summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-01-03 09:04:15 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-01-03 09:04:15 +0000
commit395a795126bcf0a683420db47a9afc0d672fe8ff (patch)
treea6038846d2d5c74abfee511420941b3075f847fd
parent5b752e98840d7e1c2ea4998cc4ed97e6493dff0a (diff)
downloadabuild-395a795126bcf0a683420db47a9afc0d672fe8ff.tar.gz
abuild-395a795126bcf0a683420db47a9afc0d672fe8ff.tar.bz2
abuild-395a795126bcf0a683420db47a9afc0d672fe8ff.tar.xz
abuild-395a795126bcf0a683420db47a9afc0d672fe8ff.zip
abuild: implemented listpkg and cleanoldpkg
-rwxr-xr-xabuild23
1 files changed, 23 insertions, 0 deletions
diff --git a/abuild b/abuild
index 1263741..bd82e4b 100755
--- a/abuild
+++ b/abuild
@@ -204,6 +204,19 @@ cleanpkg() {
done
}
+# clean all packages except current
+cleanoldpkg() {
+ local i j
+ msg "Cleaning all packages except $pkgver-r$pkgrel..."
+ for i in $pkgname $subpackages; do
+ for j in "$PKGDEST"/${i%:*}-[0-9]*.apk; do
+ [ "$j" != "$PKGDEST/${i%:*}-$pkgver-r$pkgrel.apk" ] \
+ && rm -f "$j"
+ done
+ done
+ return 0
+}
+
runpart() {
local part=$1
[ -n "$DEBUG" ] && msg "$part"
@@ -465,6 +478,14 @@ stripbin() {
return 0
}
+# simply list target apks
+listpkg() {
+ local i
+ for i in $pkgname $subpackages; do
+ echo "${i%:*}-$pkgver-r$pkgrel.apk"
+ done
+}
+
usage() {
echo "$(basename $0) $abuild_ver"
echo "usage: $0 [options] [cmd] ..."
@@ -482,9 +503,11 @@ usage() {
echo " md5check Check md5sums"
echo " unpack Unpack sources to \$srcdir"
echo " build Compile and install package into \$pkgdir"
+ echo " listpkg List target packages"
echo " package Create package in \$PKGDEST"
echo " rootpkg Run '$0 build package' as fakeroot"
echo " clean Remove temp build and install dirs"
+ echo " cleanoldpkg Remove binary packages except current version"
echo " cleanpkg Remove already built binary and source package"
echo " cleancache Remove downloaded files from \$SRCDEST"
echo " srcpkg Make a source package"