cpt

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

commit 8c131f85c4261dc83728adac7f90eebfad25aa35
parent cc4a25d628da9525ec81e39e8894689344f4e8a9
Author: Cem Keylan <cem@ckyln.com>
Date:   Tue, 14 Apr 2020 21:04:08 +0300

kiss: use the current working directory for packages if no argument is specified

These affect:
* build
* checksum
* install
* remove

Diffstat:
Mkiss | 11+++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/kiss b/kiss @@ -1238,7 +1238,7 @@ args() { # Parse some arguments earlier to remove the need to duplicate code. case $action in - c|checksum|s|search) + s|search) [ "$1" ] || die "'kiss $action' requires an argument" ;; @@ -1252,8 +1252,6 @@ args() { ;; i|install|r|remove) - [ "$1" ] || die "'kiss $action' requires an argument" - # Rerun the script with 'su' if the user isn't root. # Cheeky but 'su' can't be used on shell functions themselves. [ "$uid" = 0 ] || { @@ -1263,6 +1261,10 @@ args() { ;; esac + case $action in + b|build|c|checksum|i|install|r|remove) + [ "$1" ] || set -- "${PWD##*/}" ; esac + # Actions can be abbreviated to their first letter. This saves # keystrokes once you memorize the commands. case $action in @@ -1285,9 +1287,6 @@ args() { ;; b|build) - # If no arguments were passed, rebuild all packages. - [ "$1" ] || { cd "$sys_db" && { set +f; set -f -- *; } } - pkg_build "${@:?No packages installed}" ;;