-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docs, CI, and tools for building man pages.
- Loading branch information
Showing
8 changed files
with
82 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
# This script validates that there aren't any changes to the man pages. | ||
|
||
set -e | ||
|
||
cd src/doc | ||
|
||
changes=$(git status --porcelain .) | ||
if [ -n "$changes" ] | ||
then | ||
echo "git directory must be clean before running this script." | ||
exit 1 | ||
fi | ||
|
||
./build-man.sh | ||
|
||
changes=$(git status --porcelain .) | ||
if [ -n "$changes" ] | ||
then | ||
echo "Detected changes in man pages:" | ||
echo "$changes" | ||
echo | ||
echo "Please run './build-man.sh' in the src/doc directory to rebuild the" | ||
echo "man pages, and commit the changes." | ||
exit 1 | ||
fi |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
# | ||
# This script builds the Cargo man pages. | ||
# | ||
# The source for the man pages are located in src/doc/man/ in markdown format. | ||
# These also are handlebars templates, see crates/mdman/README.md for details. | ||
# | ||
# The generated man pages are placed in the src/etc/man/ directory. The pages | ||
# are also expanded into markdown (after being expanded by handlebars) and | ||
# saved in the src/doc/src/commands/ directory. These are included in the | ||
# Cargo book, which is converted to HTML by mdbook. | ||
|
||
set -e | ||
|
||
OPTIONS="--url https://doc.rust-lang.org/cargo/commands/ \ | ||
--man rustc:1=https://doc.rust-lang.org/rustc/index.html \ | ||
--man rustdoc:1=https://doc.rust-lang.org/rustdoc/index.html" | ||
|
||
cargo run --manifest-path=../../crates/mdman/Cargo.toml -- \ | ||
-t md -o src/commands man/cargo*.md \ | ||
$OPTIONS | ||
|
||
cargo run --manifest-path=../../crates/mdman/Cargo.toml -- \ | ||
-t txt -o man/generated_txt man/cargo*.md \ | ||
$OPTIONS | ||
|
||
cargo run --manifest-path=../../crates/mdman/Cargo.toml -- \ | ||
-t man -o ../etc/man man/cargo*.md \ | ||
$OPTIONS |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<style> | ||
dd { | ||
margin-bottom: 1em; | ||
} | ||
</style> |