2020-04-23 20:17:23 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
## live-build(7) - System Build Scripts
|
|
|
|
## Copyright (C) 2016-2020 The Debian Live team
|
|
|
|
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
|
|
|
|
##
|
|
|
|
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
|
|
|
|
## This is free software, and you are welcome to redistribute it
|
|
|
|
## under certain conditions; see COPYING for details.
|
|
|
|
|
|
|
|
|
|
|
|
Man ()
|
|
|
|
{
|
fix usage/help/man bugs
- the definition of $PROGRAM as used in $USAGE strings defined in each
script has been broken for a long time, being simply "lb" when it needs
to be "lb COMMAND".
- `config` changed $PROGRAM to "lb config" thus its output was correct in
this regard unlike everything else, but with the switch to a more
"intelligent" `Man()` function recently, it means that instead of
`man lb config`, what was actually run was `man lb config config`,
which displayed the manpage, then on exiting with `q`, it showed some
sort of index line todo with a "config" search (no exact manpage
match?), for which you had to enter `ctrl+c` to get rid of.
this revises things to fix the issues, minimising change by changing
$PROGRAM to "lb COMMAND", with the frontend overriding this.
Gbp-Dch: Ignore
2020-05-03 00:25:55 +00:00
|
|
|
if command -v man >/dev/null; then
|
2024-11-06 09:31:14 -01:00
|
|
|
if [ -n "${LIVE_BUILD}" -a -e "${LIVE_BUILD}/manpages/en/lb_${PROGRAM#lb }.1" ]; then
|
|
|
|
man ${LIVE_BUILD}/manpages/en/lb_${PROGRAM#lb }.1
|
|
|
|
else
|
|
|
|
man ${PROGRAM}
|
|
|
|
fi
|
2020-04-24 14:38:45 +00:00
|
|
|
else
|
|
|
|
Echo_warning "man is not installed, falling back to usage output."
|
|
|
|
Usage
|
2020-04-23 20:17:23 +00:00
|
|
|
fi
|
2020-04-24 14:38:45 +00:00
|
|
|
exit 0
|
2020-04-23 20:17:23 +00:00
|
|
|
}
|