
Includes: generator script, ronn source, manpage output Signed-off-by: Adam Vandenberg <flangy@gmail.com> Man page updates. * Generator command is now an external command with additional options * Added more brew commands * Tweaks and reformats
38 lines
790 B
Bash
Executable File
38 lines
790 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
man1_suffix="share/man/man1/brew.1"
|
|
source_path="$HOMEBREW_REPOSITORY/Library/Contributions/manpages"
|
|
target_file="$HOMEBREW_REPOSITORY/$man1_suffix"
|
|
|
|
|
|
die (){
|
|
echo $1
|
|
exit 1
|
|
}
|
|
|
|
test "$1" = '--link' || \
|
|
test "$1" = '-l' && {
|
|
ln -s "$target_file" "$HOMEBREW_PREFIX/$man1_suffix"
|
|
exit 0
|
|
}
|
|
|
|
/usr/bin/which -s ronn || die "You need to \"gem install ronn\" and put it in your path."
|
|
|
|
test "$1" = '--server' || \
|
|
test "$1" = '-s' && {
|
|
echo "Manpage test server: http://localhost:1207/"
|
|
echo "Control-C to exit."
|
|
ronn --server $source_path/*
|
|
exit 0
|
|
}
|
|
|
|
echo "Writing manpage to $target_file"
|
|
ronn --roff --pipe --organization='Homebrew' --manual='brew' $source_path/brew.1.md > $target_file
|
|
|
|
test "$1" = '--verbose' || \
|
|
test "$1" = '-v' && {
|
|
man brew
|
|
}
|