From 2f1babae6fc5713a04f3739bacba2c0baacab0bb Mon Sep 17 00:00:00 2001 From: sharkdp Date: Sat, 21 Sep 2019 15:05:24 +0200 Subject: Add initial version of man page, closes #30 --- ci/before_deploy.bash | 7 ++++++- doc/diskus.1 | 31 +++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 doc/diskus.1 diff --git a/ci/before_deploy.bash b/ci/before_deploy.bash index e9530c0..6165827 100755 --- a/ci/before_deploy.bash +++ b/ci/before_deploy.bash @@ -23,7 +23,8 @@ pack() { cp "target/$TARGET/release/$PROJECT_NAME" "$tempdir/$package_name/" strip "$tempdir/$package_name/$PROJECT_NAME" - # readme and license + # manpage, readme and license + cp "doc/$PROJECT_NAME.1" "$tempdir/$package_name" cp README.md "$tempdir/$package_name" cp LICENSE-MIT "$tempdir/$package_name" cp LICENSE-APACHE "$tempdir/$package_name" @@ -69,6 +70,10 @@ make_deb() { install -Dm755 "target/$TARGET/release/$PROJECT_NAME" "$tempdir/usr/bin/$PROJECT_NAME" strip "$tempdir/usr/bin/$PROJECT_NAME" + # manpage + install -Dm644 "doc/$PROJECT_NAME.1" "$tempdir/usr/share/man/man1/$PROJECT_NAME.1" + gzip --best "$tempdir/usr/share/man/man1/$PROJECT_NAME.1" + # readme and license install -Dm644 README.md "$tempdir/usr/share/doc/$PROJECT_NAME/README.md" install -Dm644 LICENSE-MIT "$tempdir/usr/share/doc/$PROJECT_NAME/LICENSE-MIT" diff --git a/doc/diskus.1 b/doc/diskus.1 new file mode 100644 index 0000000..8ffc5c7 --- /dev/null +++ b/doc/diskus.1 @@ -0,0 +1,31 @@ +.TH DISKUS "1" +.SH NAME +diskus - Compute disk usage for the given filesystem entries +.SH SYNOPSIS +.B diskus +.RB [OPTIONS] +.RB [path...] +.SH OPTIONS +.TP +\fB\-j\fR, \fB\-\-threads\fR +Set the number of threads (default: 3 x num cores) +.TP +\fB\-\-size\-format\fR +Output format for file sizes (decimal: MB, binary: MiB) [default: decimal] +[possible values: decimal, binary] +.TP +\fB\-v\fR, \fB\-\-verbose\fR +Do not hide filesystem errors +.TP +\fB\-b\fR, \fB\-\-apparent\-size\fR +Compute apparent size instead of disk usage +.TP +\fB\-h\fR, \fB\-\-help\fR +Prints help information +.TP +\fB\-V\fR, \fB\-\-version\fR +Prints version information +.SH ARGUMENTS +.TP +... +List of filesystem paths -- cgit v1.2.3