aboutsummaryrefslogtreecommitdiff
path: root/kiss
diff options
context:
space:
mode:
authornoreply@github.com <noreply@github.com>2019-09-01 13:27:08 +0000
committernoreply@github.com <noreply@github.com>2019-09-01 13:27:08 +0000
commit6170028f7dda2ab0d7a6c585924688278ccf18da (patch)
treea1ba84a057a2db32a75b6aba4466b5449a35a2d0 /kiss
parent34ccb80dda9a2ca0be40f1eddb16e3f2d8ed60bf (diff)
parentec5152c9616a56d4efd870b882eebf5f3ff76957 (diff)
downloadcpt-6170028f7dda2ab0d7a6c585924688278ccf18da.tar.gz
Merge pull request #49 from kisslinux/clean
kiss: clean repo_dir variables used once FossilOrigin-Name: c42c0af4a6446321876e3c2d4befff3aab44190f2b46e4733b3ab837e1989217
Diffstat (limited to 'kiss')
-rwxr-xr-xkiss28
1 files changed, 9 insertions, 19 deletions
diff --git a/kiss b/kiss
index d15f27b..63bb688 100755
--- a/kiss
+++ b/kiss
@@ -248,10 +248,8 @@ pkg_strip() {
# Strip package binaries and libraries. This saves space on the
# system as well as on the tar-balls we ship for installation.
- repo_dir=$(pkg_find "$1")
-
# Package has stripping disabled, stop here.
- [ -f "$repo_dir/nostrip" ] && return
+ [ -f "$(pkg_find "$1")/nostrip" ] && return
log "[$1] Stripping binaries and libraries"
@@ -374,10 +372,8 @@ pkg_tar() {
# This tar-ball also contains the package's database entry.
log "[$1] Creating tar-ball"
- repo_dir=$(pkg_find "$1")
-
# Read the version information to name the package.
- read -r version release < "$repo_dir/version"
+ read -r version release < "$(pkg_find "$1")/version"
# Create a tar-ball from the contents of the built package.
tar zpcf "$bin_dir/$1#$version-$release.tar.gz" -C "$pkg_dir/$1" . ||
@@ -448,10 +444,8 @@ pkg_build() {
;;
esac
- repo_dir=$(pkg_find "$pkg")
-
# Figure out the version and release.
- read -r version release < "$repo_dir/version"
+ read -r version release < "$(pkg_find "$pkg")/version"
# Remove the current package from the package list.
shift
@@ -472,10 +466,8 @@ pkg_build() {
for pkg; do pkg_lint "$pkg"; done
for pkg; do
- repo_dir=$(pkg_find "$pkg")
-
# Ensure that checksums exist prior to building the package.
- [ -f "$repo_dir/checksums" ] || {
+ [ -f "$(pkg_find "$pkg")/checksums" ] || {
log "[$pkg] Checksums are missing"
# Instead of dying above, log it to the terminal. Also define a
@@ -717,10 +709,8 @@ pkg_install() {
tar_file=$pkg
else
- repo_dir=$(pkg_find "$pkg")
-
# Read the version information to name the package.
- read -r version release < "$repo_dir/version"
+ read -r version release < "$(pkg_find "$pkg")/version"
# Construct the name of the package tarball.
tar_name=$pkg\#$version-$release.tar.gz
@@ -891,17 +881,17 @@ pkg_updates() {
set +f
for pkg in "$KISS_ROOT/$pkg_db/"*; do
- repo_dir=$(pkg_find "${pkg##*/}")
+ pkg_name=${pkg##*/}
# Read version and release information from the installed packages
# and repository.
read -r db_ver db_rel < "$pkg/version"
- read -r re_ver re_rel < "$repo_dir/version"
+ read -r re_ver re_rel < "$(pkg_find "$pkg_name")/version"
# Compare installed packages to repository packages.
[ "$db_ver-$db_rel" != "$re_ver-$re_rel" ] && {
- printf '%s\n' "${pkg##*/} $db_ver-$db_rel ==> $re_ver-$re_rel"
- outdated="$outdated${pkg##*/} "
+ printf '%s\n' "$pkg_name $db_ver-$db_rel ==> $re_ver-$re_rel"
+ outdated="$outdated $pkg_name "
}
done