forked from Yelp/paasta
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added help2man to create man pages for PAASTA-229
- Loading branch information
1 parent
ff20467
commit 6ee879e
Showing
9 changed files
with
52 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ dist/ | |
paasta_tools.egg-info/ | ||
debian/paasta-tools/ | ||
debian/files | ||
docs/man/ |
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,35 @@ | ||
#!/bin/bash | ||
|
||
#..... so aparently we can't run paasta tools at all unless | ||
# this dir exists | ||
mkdir -p /nail/etc/services | ||
|
||
mkdir -p docs/man/ | ||
. .tox/py/bin/activate | ||
|
||
VERSION=`./paasta_tools/paasta_cli/paasta_cli.py version` | ||
|
||
function build_man() { | ||
COMMAND=$1 | ||
help2man --name=$COMMAND --version-string=$VERSION "./paasta_tools/paasta_cli/paasta_cli.py $COMMAND" > docs/man/paasta-$COMMAND.1 | ||
} | ||
|
||
|
||
|
||
for FILE in paasta_tools/paasta_cli/cmds/*.py | ||
do | ||
BASE=`basename $FILE` | ||
COMMAND=`echo "${BASE%.*}" | tr '_' '-'` | ||
if [[ $COMMAND == '--init--' ]]; then | ||
continue | ||
fi | ||
if [[ $COMMAND == 'start-stop-restart' ]]; then | ||
continue | ||
fi | ||
build_man $COMMAND | ||
done | ||
|
||
# Start / stop / restart are munged in one file | ||
for COMMAND in start stop restart; do | ||
build_man $COMMAND | ||
done |
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 @@ | ||
docs/man/*.1 |
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
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
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