Permalink
Browse files

Fix bad globbing in man page generator script

Fixes the cause of TOOLS-372
  • Loading branch information...
1 parent 2af1d52 commit f891b9a7e78ded7013a89d88103303d3f8e7d1ba @gholms gholms committed Aug 20, 2013
Showing with 5 additions and 4 deletions.
  1. +5 −4 generate-manpages.sh
View
@@ -3,12 +3,13 @@
mkdir -p man
export PYTHONPATH=".:$PYTHONPATH"
-version="$(build/*/euca-version 2>&1 | sed -e 's/^euca2ools *\([^(]*\).*/\1/' -e 's/ *$//')"
+py_version=$(python -c 'import sys; print ".".join(map(str, sys.version_info[:2]))')
+script_dir="build/scripts-$py_version"
+version="$($script_dir/euca-version 2>&1 | sed -e 's/^euca2ools *\([^(]*\).*/\1/' -e 's/ *$//')"
for exe in $@; do
- description="$(build/*/$exe --help 2>&1 | python -c 'import sys; print sys.stdin.read().split("\n\n")[1]')"
- #version="$(build/*/$exe --version 2>&1 | sed -e 's/^euca2ools *\([^(]*\).*/\1/' -e 's/ *$//')"
- help2man -N --no-discard-stderr -S "euca2ools $version" -n "$description" --version-string "$version" -o man/$(basename $exe).1 build/*/$exe
+ description="$($script_dir/$exe --help 2>&1 | python -c 'import sys; print sys.stdin.read().split("\n\n")[1]')"
+ help2man -N --no-discard-stderr -S "euca2ools $version" -n "$description" --version-string "$version" -o man/$(basename $exe).1 $script_dir/$exe
sed -i -e 's/^.SH DESCRIPTION/.SH SYNOPSIS/' \
-e 's/usage: *//' \
-e '/^\.IP/{/^\.IP/d}' \

0 comments on commit f891b9a

Please sign in to comment.