kiss: make pkg_install operate on a single package at a time

This commit is contained in:
Dylan Araps 2019-09-11 08:25:13 +03:00
parent be3aa8928e
commit 857f03fd88
1 changed files with 100 additions and 100 deletions

18
kiss
View File

@ -642,22 +642,21 @@ pkg_remove() {
pkg_install() { pkg_install() {
# Install a built package tar-ball. # Install a built package tar-ball.
for pkg; do
# Install can also take the full path to a tar-ball. # Install can also take the full path to a tar-ball.
# We don't need to check the repository if this is the case. # We don't need to check the repository if this is the case.
if [ -f "$pkg" ] && [ -z "${pkg%%*.tar.gz}" ] ; then if [ -f "$1" ] && [ -z "${1%%*.tar.gz}" ] ; then
tar_file=$pkg tar_file=$1
else else
# Read the version information to name the package. # Read the version information to name the package.
read -r version release < "$(pkg_find "$pkg")/version" read -r version release < "$(pkg_find "$1")/version"
# Construct the name of the package tarball. # Construct the name of the package tarball.
tar_name=$pkg\#$version-$release.tar.gz tar_name=$1\#$version-$release.tar.gz
[ -f "$bin_dir/$tar_name" ] || [ -f "$bin_dir/$tar_name" ] ||
die "Package '$pkg' has not been built" \ die "Package '$1' has not been built" \
"Run 'kiss build $pkg'" "Run 'kiss build $1'"
tar_file=$bin_dir/$tar_name tar_file=$bin_dir/$tar_name
fi fi
@ -769,7 +768,6 @@ pkg_install() {
} }
log "[$pkg_name] Installed successfully" log "[$pkg_name] Installed successfully"
done
} }
pkg_updates() { pkg_updates() {
@ -961,7 +959,9 @@ args() {
esac esac
done done
pkg_install $install_pkgs for pkg in $install_pkgs; do
pkg_install "$pkg"
done
;; ;;
r|remove) r|remove)