aboutsummaryrefslogtreecommitdiff
path: root/contrib/cpt-size
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/cpt-size')
-rwxr-xr-xcontrib/cpt-size24
1 files changed, 24 insertions, 0 deletions
diff --git a/contrib/cpt-size b/contrib/cpt-size
index 0e7b9d6..2812d56 100755
--- a/contrib/cpt-size
+++ b/contrib/cpt-size
@@ -1,6 +1,30 @@
#!/bin/sh -ef
# Show the size on disk for a package
+## SYNOPSIS:
+## .Nm
+## .Op Ar pkg...
+
+## DESCRIPTION:
+## .Nm
+## 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.
+
+## CAVEATS:
+## .Nm
+## uses the non-POSIX
+## .Fl h
+## and
+## .Fl c
+## flags for
+## .Xr du 1 ,
+## which will not work with
+## .Em sbase ,
+## but it is a major performance improvement compared to calculating
+## total and human-readable sizes by hand.
+
case "$1" in
--help|-h)
printf '%s\n' "usage: ${0##*/} [pkg...]"