mirror of
https://codeberg.org/kiss-community/kiss
synced 2024-12-25 00:20:05 -07:00
kiss: Make build with no args rebuild system.
This commit is contained in:
parent
d35198bb90
commit
b59b024953
26
kiss
26
kiss
@ -346,17 +346,6 @@ pkg_build() {
|
|||||||
# also checks checksums, downloads sources and ensure all dependencies
|
# also checks checksums, downloads sources and ensure all dependencies
|
||||||
# are installed.
|
# are installed.
|
||||||
|
|
||||||
# If 'all' was passed to 'kiss build', rebuild all packages.
|
|
||||||
[ "$1" = all ] && {
|
|
||||||
cd "$KISS_ROOT/var/db/kiss" || die "Failed to find installed packages."
|
|
||||||
|
|
||||||
# Use a glob after 'cd' to generate a list of all installed packages
|
|
||||||
# based on directory names.
|
|
||||||
set -- *
|
|
||||||
|
|
||||||
[ "$1" = \* ] && die "No packages installed, aborting..."
|
|
||||||
}
|
|
||||||
|
|
||||||
# Resolve dependencies and generate a list.
|
# Resolve dependencies and generate a list.
|
||||||
# Send 'force' to 'pkg_depends' to always include the explicitly
|
# Send 'force' to 'pkg_depends' to always include the explicitly
|
||||||
# requested packages.
|
# requested packages.
|
||||||
@ -878,7 +867,20 @@ args() {
|
|||||||
# Build the list of packages.
|
# Build the list of packages.
|
||||||
b*)
|
b*)
|
||||||
shift
|
shift
|
||||||
[ "$1" ] || die "'kiss build' requires an argument."
|
|
||||||
|
# If no arguments were passed, rebuild all packages.
|
||||||
|
[ "$1" ] || {
|
||||||
|
cd "$KISS_ROOT/var/db/kiss" || die "Failed to find package db."
|
||||||
|
|
||||||
|
# Use a glob after 'cd' to generate a list of all
|
||||||
|
# installed packages based on directory names.
|
||||||
|
set -- *
|
||||||
|
|
||||||
|
# Undo the above 'cd' to ensure we stay in the same
|
||||||
|
# location.
|
||||||
|
cd - >/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
pkg_build "$@"
|
pkg_build "$@"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user