cpt

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

commit a2c2cd926eca41ac8e3edd97b7c64ebadae48abc
parent 4d0db5f051a18b9c995c24ff7091d92fdd1ed399
Author: Cem Keylan <cem@ckyln.com>
Date:   Thu, 25 Jun 2020 10:36:49 +0300

contrib: change usage outputs

Diffstat:
Mcontrib/kiss-cat | 2+-
Mcontrib/kiss-chroot | 2+-
Mcontrib/kiss-depends | 2+-
Mcontrib/kiss-export | 2+-
Mcontrib/kiss-fork | 2+-
Mcontrib/kiss-link | 2+-
Mcontrib/kiss-manifest | 2+-
Mcontrib/kiss-manifest-tree | 2+-
Mcontrib/kiss-new | 2+-
Mcontrib/kiss-owns | 2+-
Mcontrib/kiss-repodepends | 2+-
Mcontrib/kiss-revdepends | 2+-
Mcontrib/kiss-size | 2+-
13 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/contrib/kiss-cat b/contrib/kiss-cat @@ -1,7 +1,7 @@ #!/bin/sh -e # Concatanate package files in the installed package database # File names are printed to stderr. -case "$1" in ''|--help|-h) printf '\033[1;33m-> \033[musage: %s <pkg> [file] [file]\n' "${0##*/}" ; exit 0; esac +case "$1" in ''|--help|-h) printf '\033[1;33m-> \033[musage: %s [pkg] [file...]\n' "${0##*/}" ; exit 0; esac kiss l "${pkg:=$1}" >/dev/null ; shift diff --git a/contrib/kiss-chroot b/contrib/kiss-chroot @@ -5,7 +5,7 @@ log() { printf '\033[32m->\033[m %s.\n' "$*" } -usage() { printf '\033[1;33m-> \033[m%s\n' "usage: ${0##*/} <directory>" ; exit 0 ;} +usage() { printf '\033[1;33m-> \033[m%s\n' "usage: ${0##*/} [dir]" ; exit 0 ;} die() { log "$*" >&2 diff --git a/contrib/kiss-depends b/contrib/kiss-depends @@ -1,7 +1,7 @@ #!/bin/sh -ef # Display a package's dependencies -case "$1" in ''|--help|-h) printf '\033[1;33m-> \033[m%s\n' "usage: ${0##*/} <pkg>" ; exit 0 ; esac +case "$1" in ''|--help|-h) printf '\033[1;33m-> \033[m%s\n' "usage: ${0##*/} [pkg]" ; exit 0 ; esac kiss l "$1" >/dev/null cat "$KISS_ROOT/var/db/kiss/installed/$1/depends" 2>/dev/null diff --git a/contrib/kiss-export b/contrib/kiss-export @@ -1,7 +1,7 @@ #!/bin/sh -ef # Turn an installed package into a KISS tarball -case "$1" in ''|--help|-h) printf '\033[1;33m-> \033[m%s\n' "usage: ${0##*/} <pkg>" ; exit 0 ; esac +case "$1" in ''|--help|-h) printf '\033[1;33m-> \033[m%s\n' "usage: ${0##*/} [pkg]" ; exit 0 ; esac kiss l "${1:-null}" >/dev/null diff --git a/contrib/kiss-fork b/contrib/kiss-fork @@ -1,7 +1,7 @@ #!/bin/sh -ef # Fork a package to the current directory -case "$1" in ''|--help|-h) printf '\033[1;33m-> \033[m%s\n' "usage: ${0##*/} <pkg>" ; exit 0 ; esac +case "$1" in ''|--help|-h) printf '\033[1;33m-> \033[m%s\n' "usage: ${0##*/} [pkg]" ; exit 0 ; esac [ "$KISS_FORCE" ] || { [ -d "$1" ] && { printf '\033[1;31m!> \033[m%s\n' "$1 already exists on the current directory" \ diff --git a/contrib/kiss-link b/contrib/kiss-link @@ -1,7 +1,7 @@ #!/bin/sh -ef # Link a forked package's files to the other repository -case "$1" in ''|--help|-h) printf '\033[1;33m-> \033[musage: kiss-link [file] [file]\n' ; exit 0 ; esac +case "$1" in ''|--help|-h) printf '\033[1;33m-> \033[musage: kiss-link [file...]\n' ; exit 0 ; esac # Check if the package exists in a repository and error out here # if it does not. The error message from the package manager will diff --git a/contrib/kiss-manifest b/contrib/kiss-manifest @@ -1,6 +1,6 @@ #!/bin/sh -ef # Display all files owned by a package -case "$1" in ''|--help|-h) printf '\033[1;33m-> \033[m%s\n' "usage: ${0##*/} <pkg>" ; exit 0 ; esac +case "$1" in ''|--help|-h) printf '\033[1;33m-> \033[m%s\n' "usage: ${0##*/} [pkg]" ; exit 0 ; esac kiss l "$1" >/dev/null cat "$KISS_ROOT/var/db/kiss/installed/$1/manifest" 2>/dev/null diff --git a/contrib/kiss-manifest-tree b/contrib/kiss-manifest-tree @@ -1,7 +1,7 @@ #!/bin/sh -ef # Display all files owned by a package with a tree view -case "$1" in ''|--help|-h) printf '\033[1;33m-> \033[m%s\n' "usage: ${0##*/} <pkg>" ; exit 0 ; esac +case "$1" in ''|--help|-h) printf '\033[1;33m-> \033[m%s\n' "usage: ${0##*/} [pkg]" ; exit 0 ; esac kiss l "$1" >/dev/null printf '%s\n' "[$1]:" tree -C --fromfile "$KISS_ROOT/var/db/kiss/installed/$1/manifest" | sed 1,2d diff --git a/contrib/kiss-new b/contrib/kiss-new @@ -4,7 +4,7 @@ out() { printf '\033[1;33m-> \033[m%s\n' "$@" >&2 ;} die() { printf '\033[1;31m!> \033[m%s\n' "$@" >&2 ; exit 1 ;} -case "$1" in ''|--help|-h) out "usage: ${0##*/} <name> [version] [source]"; exit 0; esac +case "$1" in ''|--help|-h) out "usage: ${0##*/} [name] [version] [source]"; exit 0; esac [ -d "$1" ] && die "Package '$1' already exists." diff --git a/contrib/kiss-owns b/contrib/kiss-owns @@ -1,7 +1,7 @@ #!/bin/sh -e # Check which package owns a file -case "$1" in ''|--help|-h) printf '%s\n' "usage: kiss-owns <file>" ; exit 0 ; esac +case "$1" in ''|--help|-h) printf '%s\n' "usage: kiss-owns [file]" ; exit 0 ; esac # Strip 'KISS_ROOT' from the file path if passed and # follow symlinks. diff --git a/contrib/kiss-repodepends b/contrib/kiss-repodepends @@ -1,7 +1,7 @@ #!/bin/sh -e # Display a package's dependencies in the repository -case "$1" in ''|--help|-h) printf '%s\n' "usage: kiss-repodepends <pkg>" ; exit 0 ; esac +case "$1" in ''|--help|-h) printf '%s\n' "usage: kiss-repodepends [pkg]" ; exit 0 ; esac kiss s "$1" >/dev/null cat "$(kiss s "$1" | sed 1q)/depends" 2>/dev/null diff --git a/contrib/kiss-revdepends b/contrib/kiss-revdepends @@ -1,7 +1,7 @@ #!/bin/sh -e # Display packages which depend on package -case "$1" in ''|--help|-h) printf '%s\n' "usage: kiss-revdepends <pkg>" ; exit 0 ; esac +case "$1" in ''|--help|-h) printf '%s\n' "usage: kiss-revdepends [pkg]" ; exit 0 ; esac kiss s "$1" >/dev/null # 'cd' to the database directory as a simple way of diff --git a/contrib/kiss-size b/contrib/kiss-size @@ -1,7 +1,7 @@ #!/bin/sh -ef # Show the size on disk for a package -case "$1" in ''|--help|-h) printf '%s\n' "usage: kiss-size <pkg>" ; exit 0 ; esac +case "$1" in ''|--help|-h) printf '%s\n' "usage: kiss-size [pkg]" ; exit 0 ; esac kiss s "$1" >/dev/null # Filter directories from manifest and leave only files.