mirror of
https://codeberg.org/kiss-community/kiss
synced 2024-12-25 08:30:05 -07:00
pkg_find: use case
This commit is contained in:
parent
dc776868d2
commit
759e4fb868
23
kiss
23
kiss
@ -210,13 +210,24 @@ pkg_find() {
|
|||||||
|
|
||||||
unset IFS
|
unset IFS
|
||||||
|
|
||||||
# A package may also not be found due to a repository not being readable
|
|
||||||
# by the current user. Either way, we need to die here.
|
|
||||||
[ "$5" ] || return 1
|
|
||||||
|
|
||||||
# Show all search results if called from 'kiss search', else store the
|
# Show all search results if called from 'kiss search', else store the
|
||||||
# value in a variable.
|
# values in variables.
|
||||||
[ "$2" ] && { shift 4; printf '%s\n' "$@"; } || repo_dir=$5
|
case $2-$# in
|
||||||
|
*-4)
|
||||||
|
# A package may also not be found due to a repository not being
|
||||||
|
# readable by the current user. Either way, we need to die here.
|
||||||
|
return 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
-*)
|
||||||
|
repo_dir=$5
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
shift 4
|
||||||
|
printf '%s\n' "$@";
|
||||||
|
;;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_list() {
|
pkg_list() {
|
||||||
|
Loading…
Reference in New Issue
Block a user