Update with more install targets.

Installing headers and library to /usr/local/
Requires workaround for version information header generation

Install a man page

Install some basic bash completion for maps

Also update the readme to fit with the manpage and new autocompletion features

Fixes the oddity where generated map files were missing the initial line of the header
This commit is contained in:
mdiluzio 2014-12-30 18:37:46 +00:00
parent 53e882ae12
commit 2273c93f11
8 changed files with 179 additions and 83 deletions

29
scripts/gen_manpage.sh Executable file
View file

@ -0,0 +1,29 @@
#! /bin/bash
# Used to a man page from markdown
echo ".\" Man page for the ttrts project" > $1
echo ".\" this man page is auto-generated, do not edit directly" >> $1
echo ".TH TTRTS\ v0.3.0 6 $(date +%Y-%m-%d) http://mdiluz.github.io/ttrts/" >> $1
# sections to section headers
# sub-sections in man page sub-sections
# 4-space lines to tabs
# tab starts removed
# Environment variables in bold
# User variables in italics
# remove all line-widths
# Put all back-ticks quotes in bold
# underline mapfile opt
# ensure name section uses correct
cat "$2" \
| sed -r 's/^# (\w+)/.SH \1/g' \
| sed -r 's/^##+ (\w+)/.SS \1/g' \
| sed -r 's/^ (.*)$/\n\t\1\n/g' \
| sed -r 's/^\t//g' \
| sed -r 's/\$\{(\w+)\}/\\fB\$\1\\fR/g' \
| sed -r 's/\{(\w+)\}/\\fI\1\\fR/g' \
| sed -r 's/-----+//g' \
| sed -r 's/`(.*?)`/\\fB\1\\fR/g' \
| sed -r 's/MAPFILE/\\fImapfile\\fR/g' \
| sed -r 's/\tttrts -/\tttrts \\-/g' >> $1