forked from kiss-community/kiss
Use full kiss subcommands for readability and safety
This commit is contained in:
parent
fb3ac1f7e9
commit
d94c811e7f
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
# Ignore shellcheck as we want the warning's behavior.
|
# Ignore shellcheck as we want the warning's behavior.
|
||||||
# shellcheck disable=2015
|
# shellcheck disable=2015
|
||||||
kiss l "${1:-null}" >/dev/null || {
|
kiss list "${1:-null}" >/dev/null || {
|
||||||
printf 'usage: kiss-depends [pkg]\n'
|
printf 'usage: kiss-depends [pkg]\n'
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
# Ignore shellcheck as we want the warning's behavior.
|
# Ignore shellcheck as we want the warning's behavior.
|
||||||
# shellcheck disable=2015
|
# shellcheck disable=2015
|
||||||
kiss l "${1:-null}" >/dev/null || {
|
kiss list "${1:-null}" >/dev/null || {
|
||||||
printf 'usage: kiss-export [pkg]\n'
|
printf 'usage: kiss-export [pkg]\n'
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
# Ignore shellcheck as we want the warning's behavior.
|
# Ignore shellcheck as we want the warning's behavior.
|
||||||
# shellcheck disable=2015
|
# shellcheck disable=2015
|
||||||
[ "$1" ] && kiss s "${1:-null}" >/dev/null || {
|
[ "$1" ] && kiss search "${1:-null}" >/dev/null || {
|
||||||
printf 'usage: [kiss-fork [pkg]] [index]\n'
|
printf 'usage: [kiss-fork [pkg]] [index]\n'
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
@ -14,7 +14,7 @@ num=$2
|
|||||||
# is intentional. This grabs the location of the package's files.
|
# is intentional. This grabs the location of the package's files.
|
||||||
# shellcheck disable=2046
|
# shellcheck disable=2046
|
||||||
(
|
(
|
||||||
set -- $(kiss s "$1")
|
set -- $(kiss search "$1")
|
||||||
|
|
||||||
shift "${num:-0}"
|
shift "${num:-0}"
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ oPWD=$PWD
|
|||||||
# Check if the package exists in a repository and error out here
|
# Check if the package exists in a repository and error out here
|
||||||
# if it does not. The error message from the package manager will
|
# if it does not. The error message from the package manager will
|
||||||
# be displayed.
|
# be displayed.
|
||||||
kiss s "${PWD##*/}" >/dev/null
|
kiss search "${PWD##*/}" >/dev/null
|
||||||
|
|
||||||
# Disable this warning as globbing is disabled and word splitting
|
# Disable this warning as globbing is disabled and word splitting
|
||||||
# is intentional. This grabs the location of the package's files.
|
# is intentional. This grabs the location of the package's files.
|
||||||
@ -25,7 +25,7 @@ kiss s "${PWD##*/}" >/dev/null
|
|||||||
# Generate a list of repositories in which the package
|
# Generate a list of repositories in which the package
|
||||||
# exists. Then 'cd' to the first found directory to do a
|
# exists. Then 'cd' to the first found directory to do a
|
||||||
# comparison.
|
# comparison.
|
||||||
set -- $(kiss s "${PWD##*/}"); cd "$1"
|
set -- $(kiss search "${PWD##*/}"); cd "$1"
|
||||||
|
|
||||||
# Error if the package exists nowhere but the current
|
# Error if the package exists nowhere but the current
|
||||||
# directory and this script would create a broken symlink.
|
# directory and this script would create a broken symlink.
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
set -- "${PWD##*/}"
|
set -- "${PWD##*/}"
|
||||||
}
|
}
|
||||||
|
|
||||||
kiss s "$@" | sort -u | while read -r repo; do cd "$repo"
|
kiss search "$@" | uniq -u | while read -r repo; do cd "$repo"
|
||||||
m=$(git log -1 version 2>/dev/null) ||:
|
m=$(git log -1 version 2>/dev/null) ||:
|
||||||
m=${m##*Author: }
|
m=${m##*Author: }
|
||||||
m=${m%%>*}
|
m=${m%%>*}
|
||||||
|
@ -1,15 +1,14 @@
|
|||||||
#!/bin/sh -ef
|
#!/bin/sh -ef
|
||||||
# Display all files owned by a package
|
# Display all files owned by a package
|
||||||
|
|
||||||
# CRUX style usage using the current directory as the name of the package to be
|
# Use the current directory as the package name if no package is given.
|
||||||
# operated on.
|
|
||||||
[ "$1" ] || {
|
[ "$1" ] || {
|
||||||
set -- "${PWD##*/}"
|
set -- "${PWD##*/}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Ignore shellcheck as we want the warning's behavior.
|
# Ignore shellcheck as we want the warning's behavior.
|
||||||
# shellcheck disable=2015
|
# shellcheck disable=2015
|
||||||
kiss l "${1:-null}" >/dev/null || {
|
kiss list "${1:-null}" >/dev/null || {
|
||||||
printf 'usage: kiss-manifest [pkg]\n'
|
printf 'usage: kiss-manifest [pkg]\n'
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# Intended behavior.
|
# Intended behavior.
|
||||||
# shellcheck disable=2106
|
# shellcheck disable=2106
|
||||||
|
|
||||||
kiss s "${@:-*}" | (while read -r pkg_loc _; do {
|
kiss search "${@:-*}" | (while read -r pkg_loc _; do {
|
||||||
read -r ver _ 2>/dev/null < "$pkg_loc/version" || continue
|
read -r ver _ 2>/dev/null < "$pkg_loc/version" || continue
|
||||||
|
|
||||||
pkg=${pkg_loc##*/}
|
pkg=${pkg_loc##*/}
|
||||||
|
@ -17,5 +17,5 @@ done
|
|||||||
[ "$1" ] && {
|
[ "$1" ] && {
|
||||||
printf 'WARNING: This will remove \033[1m%s\033[m package(s).\n' "$#"
|
printf 'WARNING: This will remove \033[1m%s\033[m package(s).\n' "$#"
|
||||||
printf 'Continue? [Enter/Ctrl+C]\n'
|
printf 'Continue? [Enter/Ctrl+C]\n'
|
||||||
read -r _ && KISS_FORCE=1 kiss r "$@"
|
read -r _ && KISS_FORCE=1 kiss remove "$@"
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ get_size() {
|
|||||||
|
|
||||||
# Ignore shellcheck as we want the warning's behavior.
|
# Ignore shellcheck as we want the warning's behavior.
|
||||||
# shellcheck disable=2015
|
# shellcheck disable=2015
|
||||||
kiss l "${1:-null}" >/dev/null || {
|
kiss list "${1:-null}" >/dev/null || {
|
||||||
printf 'usage: kiss-size [pkg]\n'
|
printf 'usage: kiss-size [pkg]\n'
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user