diff options
author | merakor <cem@ckyln.com> | 2021-09-20 12:26:30 +0000 |
---|---|---|
committer | merakor <cem@ckyln.com> | 2021-09-20 12:26:30 +0000 |
commit | 9cf037c91ecff19219388e6f37622658527b360b (patch) | |
tree | b93f2be2e7a46c06a91f91ee679d7236695d7ffc /contrib/cpt-size | |
parent | 9c36c85d1c00a3fc9c5bed4940873aa6149a76f9 (diff) | |
parent | 9ee647190e9927decdcb959337cc2bd5b480b4c7 (diff) | |
download | cpt-9cf037c91ecff19219388e6f37622658527b360b.tar.gz |
merge maintenance branch
FossilOrigin-Name: 1de039467a1cf2facde24b23f24fcefb6bc6eb9f2dfdfff0165416542d2b2724
Diffstat (limited to 'contrib/cpt-size')
-rwxr-xr-x | contrib/cpt-size | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/cpt-size b/contrib/cpt-size index 4b983a1..00508b8 100755 --- a/contrib/cpt-size +++ b/contrib/cpt-size @@ -10,7 +10,10 @@ ## calculates the sizes of given ## .Ar packages ## using the files from the package manifest and outputs a total size of the -## packages along with all the files associated with them. +## packages along with all the files associated with them. If no arguments have +## been given, +## .Nm +## will use the name of the current directory as an argument. parser_definition() { setup REST help:usage -- "usage: ${0##*/} [pkg...]" disp :usage -h --help hidden:1 @@ -20,6 +23,9 @@ parser_definition() { # shellcheck disable=1091 . cpt-lib +# Use the current directory if no arguments have been given. +[ "$1" ] || set -- "${PWD##*/}" + # Ensure that all the packages given as arguments are installed. pkg_list "$@" >/dev/null |