cpt

[ARCHIVED] Carbs Packaging Tools
git clone git://git.ckyln.com/~cem/cpt.git
Log | Files | Refs | README | LICENSE

commit 04c1ee5479061b06b3f8c583d000b79b38f69448
parent 15da174a701726894bc1a0e9da740ab9acb5a23d
Author: Cem Keylan <cem@ckyln.com>
Date:   Wed,  6 May 2020 15:55:18 +0300

kiss: fix doc-strings for contrib scripts

Diffstat:
Mcontrib/kiss-cargo-urlgen | 2+-
Mcontrib/kiss-cargolock-urlgen | 3+--
Mcontrib/kiss-cat | 3+--
Mcontrib/kiss-changelog | 1-
Mcontrib/kiss-chbuild | 3+--
Mcontrib/kiss-chroot | 3+--
Mcontrib/kiss-depends | 3+--
Mcontrib/kiss-depends-finder | 3+--
Mcontrib/kiss-export | 3+--
Mcontrib/kiss-fork | 1+
Mcontrib/kiss-link | 1+
Mcontrib/kiss-maintainer | 4++--
Mcontrib/kiss-manifest | 3+--
Mcontrib/kiss-manifest-tree | 3+--
Mcontrib/kiss-message | 3+--
Mcontrib/kiss-new | 1+
Mcontrib/kiss-orphans | 3+--
Mcontrib/kiss-outdated | 3+--
Mcontrib/kiss-owns | 3+--
Mcontrib/kiss-repodepends | 3+--
Mcontrib/kiss-reset | 3+--
Mcontrib/kiss-revdepends | 3+--
Mcontrib/kiss-size | 3+--
Mcontrib/kiss-which | 1+
Mkiss | 5++++-
25 files changed, 28 insertions(+), 39 deletions(-)

diff --git a/contrib/kiss-cargo-urlgen b/contrib/kiss-cargo-urlgen @@ -1,5 +1,5 @@ #!/bin/sh - +# Create static cargo sources for Rust packages [ "$1" ] || { printf '\033[1;33m-> \033[musage: kiss-cargo-urlgen [crate+ver] [crate+ver]\n' exit 1 diff --git a/contrib/kiss-cargolock-urlgen b/contrib/kiss-cargolock-urlgen @@ -1,6 +1,5 @@ #!/bin/sh - -# Converts the given Cargo.lock file to static cargo urls +# Convert the given Cargo.lock file to sources case "$1" in -) set -- /dev/stdin ;; diff --git a/contrib/kiss-cat b/contrib/kiss-cat @@ -1,6 +1,5 @@ #!/bin/sh -e - -# Concatanate package files in the installed package database. +# Concatanate package files in the installed package database # File names are printed to stderr. [ "$1" ] || { printf '\033[1;33m-> \033[musage: %s <pkg> [file] [file]\n' "${0##*/}" ; exit 1;} diff --git a/contrib/kiss-changelog b/contrib/kiss-changelog @@ -1,5 +1,4 @@ #!/bin/sh -e - # Print the git log of the specific package [ "$1" ] || { diff --git a/contrib/kiss-chbuild b/contrib/kiss-chbuild @@ -1,6 +1,5 @@ #!/bin/sh -e -# -# Create/destroy temporary chroots. +# Create/destroy temporary chroots log() { printf '\033[31;1m->\033[m %s.\n' "$@" ;} diff --git a/contrib/kiss-chroot b/contrib/kiss-chroot @@ -1,6 +1,5 @@ #!/bin/sh -e -# -# kiss-chroot: Enter a chroot. +# Enter a chroot log() { printf '\033[32m->\033[m %s.\n' "$*" diff --git a/contrib/kiss-depends b/contrib/kiss-depends @@ -1,6 +1,5 @@ #!/bin/sh -ef -# -# kiss-depends - Display a package's dependencies. +# Display a package's dependencies [ "$1" ] || { printf '\033[1;33m-> \033[m%s\n' "usage: ${0##*/} <pkg>" ; exit 0 ;} diff --git a/contrib/kiss-depends-finder b/contrib/kiss-depends-finder @@ -1,6 +1,5 @@ #!/bin/sh -e -# -# Find missing dependencies by parsing 'ldd'. +# Find missing dependencies by parsing 'ldd' [ "$1" ] || { printf '\033[1;33m-> \033[m%s\n' "usage: ${0##*/} <pkg>" ; exit 0 ;} diff --git a/contrib/kiss-export b/contrib/kiss-export @@ -1,6 +1,5 @@ #!/bin/sh -ef -# -# kiss-export - Turn an installed package into a KISS tarball. +# Turn an installed package into a KISS tarball [ "$1" ] || { printf '\033[1;33m-> \033[m%s\n' "usage: ${0##*/} <pkg>" ; exit 0 ;} diff --git a/contrib/kiss-fork b/contrib/kiss-fork @@ -1,4 +1,5 @@ #!/bin/sh -ef +# Fork a package to the current directory [ "$1" ] || { printf '\033[1;33m-> \033[m%s\n' "usage: ${0##*/} <pkg>" ; exit 0 ;} [ "$KISS_FORCE" ] || { diff --git a/contrib/kiss-link b/contrib/kiss-link @@ -1,4 +1,5 @@ #!/bin/sh -ef +# Link a forked package's files to the other repository [ "$1" ] || { printf '\033[1;33m-> \033[musage: kiss-link [file] [file]\n' ; exit 0 ;} diff --git a/contrib/kiss-maintainer b/contrib/kiss-maintainer @@ -1,6 +1,6 @@ #!/bin/sh -ef -# -# kiss-maintainer - find the maintainer of a package. +# Find the maintainer of a package + [ "$1" ] || { printf '\033[1;33m-> \033[m%s\n' "usage: ${0##*/} <pkg>" ; exit 0 ;} kiss s "$1" | while read -r repo; do cd "$repo" diff --git a/contrib/kiss-manifest b/contrib/kiss-manifest @@ -1,6 +1,5 @@ #!/bin/sh -ef -# -# kiss-manifest - Display all files owned by a package. +# Display all files owned by a package [ "$1" ] || { printf '\033[1;33m-> \033[m%s\n' "usage: ${0##*/} <pkg>" ; exit 0 ;} kiss l "$1" >/dev/null diff --git a/contrib/kiss-manifest-tree b/contrib/kiss-manifest-tree @@ -1,6 +1,5 @@ #!/bin/sh -ef -# -# kiss-manifest-tree - Display all files owned by a package. +# Display all files owned by a package with a tree view [ "$1" ] || { printf '\033[1;33m-> \033[m%s\n' "usage: ${0##*/} <pkg>" ; exit 0 ;} kiss l "$1" >/dev/null diff --git a/contrib/kiss-message b/contrib/kiss-message @@ -1,6 +1,5 @@ #!/bin/sh - -# Utility for showing package messages in the database. +# Show messages from a package in the system database [ "$1" ] || { printf '\033[1;33m-> \033[m%s\n' "usage: ${0##*/} [pkg] [pkg]" diff --git a/contrib/kiss-new b/contrib/kiss-new @@ -1,4 +1,5 @@ #!/bin/sh -e +# Create a boilerplate KISS package out() { printf '\033[1;33m-> \033[m%s\n' "$@" >&2 ;} die() { printf '\033[1;31m!> \033[m%s\n' "$@" >&2 ; exit 1 ;} diff --git a/contrib/kiss-orphans b/contrib/kiss-orphans @@ -1,6 +1,5 @@ #!/bin/sh -e -# -# kiss-orphans - List orphaned packages. +# List orphaned packages cd "$KISS_ROOT/var/db/kiss/installed/" diff --git a/contrib/kiss-outdated b/contrib/kiss-outdated @@ -1,6 +1,5 @@ #!/bin/sh -# -# Check installed packages for updates. +# Check installed packages for updates old_IFS=$IFS diff --git a/contrib/kiss-owns b/contrib/kiss-owns @@ -1,6 +1,5 @@ #!/bin/sh -e -# -# kiss-owns - Check which package owns a file. +# Check which package owns a file [ "$1" ] || { printf '%s\n' "usage: kiss-owns <file>" ; exit 1 ;} diff --git a/contrib/kiss-repodepends b/contrib/kiss-repodepends @@ -1,6 +1,5 @@ #!/bin/sh -e -# -# kiss-repodepends +# Display a package's dependencies in the repository [ "$1" ] || { printf '%s\n' "usage: kiss-repodepends <pkg>" ; exit 1 ;} kiss s "$1" >/dev/null diff --git a/contrib/kiss-reset b/contrib/kiss-reset @@ -1,9 +1,8 @@ #!/bin/sh -ef +# Remove all packages except for the base # # Disable word-splittng warnings as they're safe here. # shellcheck disable=SC2046 -# -# kiss-reset: Remove all packages except for the base. set -- diff --git a/contrib/kiss-revdepends b/contrib/kiss-revdepends @@ -1,6 +1,5 @@ #!/bin/sh -e -# -# kiss-revdepends - Display packages which depend on package. +# Display packages which depend on package [ "$1" ] || { printf '%s\n' "usage: kiss-revdepends <pkg>" ; exit 1 ;} kiss s "$1" >/dev/null diff --git a/contrib/kiss-size b/contrib/kiss-size @@ -1,6 +1,5 @@ #!/bin/sh -ef -# -# kiss-size - Show the size on disk for a package. +# Show the size on disk for a package [ "$1" ] || { printf '%s\n' "usage: kiss-size <pkg>" ; exit 1 ;} kiss s "$1" >/dev/null diff --git a/contrib/kiss-which b/contrib/kiss-which @@ -1,4 +1,5 @@ #!/bin/sh -e +# Locate the first instance of a KISS package [ "$1" ] || { printf '\033[1;33m-> \033[m%s\n' "usage: ${0##*/} [pkg]" ; exit 1 ;} diff --git a/kiss b/kiss @@ -1475,7 +1475,10 @@ args() { done for path do - printf '\033[31;1m->\033[m %-*s ' "$max" "${path#*/kiss-}" + # These are binary files so they should be ignored + contains "readlink stat" "$path" && continue + + printf '\033[31;1m->\033[m %-*s ' "$max" "${path#*/kiss-}" sed -n 's/^# *//;2p' "$(command -v "kiss-$path")" done | sort -uk1 >&2