forked from kiss-community/kiss
args: Proper handling. Fixes: #32
This commit is contained in:
parent
ea1777aa8a
commit
314ceec509
22
kiss
22
kiss
@ -834,7 +834,7 @@ args() {
|
|||||||
# letter is right).
|
# letter is right).
|
||||||
case $1 in
|
case $1 in
|
||||||
# Build the list of packages.
|
# Build the list of packages.
|
||||||
b*)
|
b|bu|bui|buil|build)
|
||||||
shift
|
shift
|
||||||
|
|
||||||
# If no arguments were passed, rebuild all packages.
|
# If no arguments were passed, rebuild all packages.
|
||||||
@ -853,7 +853,7 @@ args() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
# Generate checksums for packages.
|
# Generate checksums for packages.
|
||||||
c*)
|
c|ch|che|chec|check|checks|checksu|checksum|checksums)
|
||||||
shift
|
shift
|
||||||
[ "$1" ] || die "'kiss checksum' requires an argument."
|
[ "$1" ] || die "'kiss checksum' requires an argument."
|
||||||
|
|
||||||
@ -867,7 +867,7 @@ args() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
# List dependencies for a package.
|
# List dependencies for a package.
|
||||||
d*)
|
d|de|dep|depe|depen|depend|depends)
|
||||||
shift
|
shift
|
||||||
[ "$1" ] || die "'kiss depends' requires an argument."
|
[ "$1" ] || die "'kiss depends' requires an argument."
|
||||||
|
|
||||||
@ -882,7 +882,7 @@ args() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
# Install packages.
|
# Install packages.
|
||||||
i*)
|
i|in|ins|inst|insta|instal|install)
|
||||||
shift
|
shift
|
||||||
[ "$1" ] || die "'kiss install' requires an argument."
|
[ "$1" ] || die "'kiss install' requires an argument."
|
||||||
root_check
|
root_check
|
||||||
@ -902,7 +902,7 @@ args() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
# Remove packages.
|
# Remove packages.
|
||||||
r*)
|
r|re|rem|remo|remov|remove)
|
||||||
shift
|
shift
|
||||||
[ "$1" ] || die "'kiss remove' requires an argument."
|
[ "$1" ] || die "'kiss remove' requires an argument."
|
||||||
root_check
|
root_check
|
||||||
@ -928,13 +928,13 @@ args() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
# List installed packages.
|
# List installed packages.
|
||||||
l*)
|
l|li|lis|list)
|
||||||
shift
|
shift
|
||||||
pkg_list "$@"
|
pkg_list "$@"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# Print package manifest.
|
# Print package manifest.
|
||||||
m*)
|
m|ma|man|mani|manif|manife|manifest)
|
||||||
shift
|
shift
|
||||||
[ "$1" ] || die "'kiss manifest' requires an argument."
|
[ "$1" ] || die "'kiss manifest' requires an argument."
|
||||||
|
|
||||||
@ -949,7 +949,7 @@ args() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
# Check which package owns a file.
|
# Check which package owns a file.
|
||||||
o*)
|
o|ow|own|owns)
|
||||||
shift
|
shift
|
||||||
[ "$1" ] || die "'kiss owns' requires an argument."
|
[ "$1" ] || die "'kiss owns' requires an argument."
|
||||||
|
|
||||||
@ -968,12 +968,12 @@ args() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
# Upgrade packages.
|
# Upgrade packages.
|
||||||
u*)
|
u|up|upg|upgr|upgra|upgrad|upgrade)
|
||||||
pkg_updates
|
pkg_updates
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# Search for packages.
|
# Search for packages.
|
||||||
s*)
|
s|se|sea|sear|searc|search)
|
||||||
shift
|
shift
|
||||||
[ "$1" ] || die "'kiss search' requires an argument."
|
[ "$1" ] || die "'kiss search' requires an argument."
|
||||||
|
|
||||||
@ -991,7 +991,7 @@ args() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
# Print version and exit.
|
# Print version and exit.
|
||||||
v*)
|
v|ve|ver|vers|versi|versio|version)
|
||||||
log "kiss 0.5.9"
|
log "kiss 0.5.9"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user