rcr – the launcher of nested scripts, named in command line.
Required
- Python-2.7
For developers
To generate new html and man documentation files from Latex sources, one will need:- latex2man script
- perl
- devdoc command from rcr sources
- links or other text browser with option -dump
- Latex typesetting system
- latex2man package
Latest release
Latest code
Description
The most nested available script is launched, and the rest arguments are passed through to it.
The directory with scripts is stored in environment variable RCR_ROOT, which rcr sets up.
Shell command below (after path substitution for rcr executable):
$ /usr/bin/rcr sub actions with argumentsis transformed into execution of command:
$ RCR_ROOT=/usr/libexec/rcr /usr/libexec/rcr/sub/actions with arguments
Here /usr/libexec/rcr/
is the base directory for your custom scripts.
When directory with the name of current word from command line appears, search is continued inside it for the next word. When executable script with the name of current word from command line appears, it is launched.
If directory entry/
was entered, but no executable script inside matches next command word, or there is no next command word, script entry/entry
is launched.
If no appropriate script was found, rcr
terminates with diagnostics.
Script, used as command, must have executable permissions and the interpretator name in the first string (for example, #!/bin/sh).
Install
$ ./install.sh
Layout of default install:
- $HOME/rrr/bin/rcr
- The main executable.
- $HOME/rrr/libexec/rcr/
- Directory to keep your custom commands.
- $HOME/rrr/etc/bash_completion.d/rcr.sh
- auto-completion support for your custom rcr commands in bash shell.
- $HOME/rrr/share/doc/rcr/
- Descriptions of the package in html format.
- $HOME/rrr/share/man/
- Manual pages for the package, same info as in html.
You would probably want to add path $HOME/rrr/bin/ to your default PATH in $HOME/.profile or $HOME/.bashrc.
To turn auto-completion for rcr commands by default for all new shell sessions, add to your $HOME/.bashrc:
$ . ~/rrr/etc/bash_completion.d/rcr.sh
Variable DESTDIR is used to keep the path to the root install destination. Its default value is:
$ DESTDIR=$HOME/rrr ./install.shPREFIX is also supported, though its value can be appended directly to DESTDIR.
To install whole rcr somewhere system-wide:
$ sudo env DESTDIR=/usr/poligon ./install.shUse direct system-wide installation only to empty separated DESTDIR. To integrate the material into working system use packages and installation methods of your OS.
Distribution
Copyright 2012-2017 Random Crew.