Skip to content

Commit

Permalink
Simplify doc building process to remove docbook2x requirement, update…
Browse files Browse the repository at this point in the history
… docs
  • Loading branch information
Sutto committed Jun 24, 2010
1 parent 55a8806 commit dd74190
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 17 deletions.
22 changes: 12 additions & 10 deletions docs/rebuild.sh
Expand Up @@ -47,16 +47,18 @@ find ${rvm_docs_src_dir} -type f -name *.txt | while read rvm_manpage_file; do
rvm_manpage_dir="$rvm_docs_target_man_dir/man$rvm_manpage_name_part"
mkdir -p "$rvm_manpage_dir"

echo "Generating docbook format from source file for $rvm_manpage_name"
asciidoc -d manpage -b docbook -o "$rvm_tmp_dir/${rvm_manpage_name}.dbk" "$rvm_manpage_file"

echo "Generating manpage from docbook"

echo "Moving manpage to the the correct folder"
mv "$rvm_tmp_dir/$rvm_manpage_name" "$rvm_manpage_dir"
# compression is optional, but gzip check added for neatness
echo "If gzip is available, compressing"
[[ `which gzip` ]] && gzip -f "$rvm_manpage_dir/$rvm_manpage_name"
echo "Generating manpage format from source file for $rvm_manpage_name"
a2x -d manpage -f manpage -D "$rvm_manpage_dir" "$rvm_manpage_file" > /dev/null 2>&1
if [[ "$?" -gt 0 ]]; then
echo "Unable to generate manpage for $rvm_manpage_name_full"
else
rm -f "$( echo "$rvm_manpage_file" | sed 's/.txt$/.xml/')"
# compression is optional, but gzip check added for neatness
if command -v gzip >/dev/null 2>&1; then
echo "gzip compressing the manpage"
gzip -f "$rvm_manpage_dir/$rvm_manpage_name"
fi
fi
done

# vim: ft=sh
20 changes: 13 additions & 7 deletions docs/rvm.txt
Expand Up @@ -92,13 +92,14 @@ OPTIONS
*--archive*::
Used to set the 'archive_flag', use with 'remove' to remove archive.

*--patch*::
With MRI Rubies you may specify one or more full paths to patches
for multiple, specify comma separated:
'--patch /.../.../a.patch[%prefix],/.../.../.../b.patch'
'prefix' is an optional argument, which will be bypassed
to the '-p' argument of the 'patch' command. It is separated
from patch file name with '%' symbol.
*--patch*, *--patches*::
With any ruby build from source, allows you to specify patch paths
and patch names to be applied prior to building. Values should
be a relative / absolute path to a patch or the name of known
patch / patchset. Optionally, paths or names may be followed by
'%someinteger' - e.g. '--patches mypatch%2' - where the number
following the % specifies the value of the -p argument to patch,
defaulting to two.

*-C, --configure*::
custom configure options. If you need to pass several configure
Expand Down Expand Up @@ -126,6 +127,11 @@ ACTIONS
*reload*::
Reload rvm source itself (useful after changing rvm source).

*env*::
Displays information about an environment specified but the
given ruby string. Useful for getting a sourceable path or an
evaluatable set of shell variable declarations.

*implode*::
(seppuku) removes the rvm installation completely.
This means everything in $rvm_path ('~/.rvm').
Expand Down
Binary file modified man/man1/rvm.1.gz
Binary file not shown.

0 comments on commit dd74190

Please sign in to comment.