forked from kiss-community/kiss
kiss: CRUX style usage fixes
This commit is contained in:
parent
d224ccad0a
commit
f41a014104
15
kiss
15
kiss
@ -1479,6 +1479,14 @@ args() {
|
|||||||
die "Arguments contain invalid characters: '!*[]' ($*)"
|
die "Arguments contain invalid characters: '!*[]' ($*)"
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# CRUX style usage using the current directory as the name of the package
|
||||||
|
# to be operated on. This needs to sit before the 'as_root()' calls as
|
||||||
|
# they reset the current working directory during their invocations.
|
||||||
|
[ "$1" ] || case $action in b|build|c|checksum|i|install|r|remove)
|
||||||
|
export KISS_PATH=${PWD%/*}:$KISS_PATH
|
||||||
|
set -- "${PWD##*/}"
|
||||||
|
esac
|
||||||
|
|
||||||
# Parse some arguments earlier to remove the need to duplicate code.
|
# Parse some arguments earlier to remove the need to duplicate code.
|
||||||
case $action in
|
case $action in
|
||||||
s|search)
|
s|search)
|
||||||
@ -1504,13 +1512,6 @@ args() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Second early check to use $PWD in place of arguments.
|
|
||||||
[ "$1" ] || case $action in b|build|c|checksum|i|install|r|remove)
|
|
||||||
export KISS_PATH=${PWD%/*}:$KISS_PATH
|
|
||||||
args "$action" "${PWD##*/}"
|
|
||||||
return 0
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Actions can be abbreviated to their first letter. This saves
|
# Actions can be abbreviated to their first letter. This saves
|
||||||
# keystrokes once you memorize the commands.
|
# keystrokes once you memorize the commands.
|
||||||
case $action in
|
case $action in
|
||||||
|
Loading…
Reference in New Issue
Block a user