mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-01-03 13:12:15 +00:00
abuild: implemented listpkg and cleanoldpkg
This commit is contained in:
parent
5b752e9884
commit
395a795126
23
abuild
23
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"
|
||||
|
Loading…
Reference in New Issue
Block a user