-
Notifications
You must be signed in to change notification settings - Fork 4
Installation
- Bash shell and a unix system environment.
No packaging exists for rerun. For now, simply "git clone" it.
cd /tmp
git clone git://github.com/dtolabs/rerun.git
cd rerun
After it is downloaded, invoke the rerun -help
to see usage and version:
$ ./rerun -help
_ __ ___ _ __ _ _ _ __
| '__/ _ \ '__| | | | '_ \
| | | __/ | | |_| | | | |
|_| \___|_| \__,_|_| |_|
Version: v0.1. License: Apache 2.0.
Usage: rerun [-h][-v][-V] [-M <dir>] [-L <dir>] [--checklog <file>] [module:[command [command_args]]]
Examples:
| $ rerun
| => List all modules.
| $ rerun freddy
| => List all freddy commands.
| $ rerun freddy:dance -jumps 3
| => Execute the freddy dance command.
Run it without arguments to see a list of installed modules.
$ ./rerun
[modules]
stubbs: "Simple rerun module builder"
Successful installation results in a module listing (stubbs module is included by default).
If you care about system packaging (e.g. RPM, DEB), feel free to contribute your ideas. We're also thinking of building rerun modules distribution around git (ala homebrew).
Update your Bash profile (e.g., .bash_profile, .bashrc) to set the following environment variables.
PATH
Add the path to your rerun
executable to your $PATH.
RERUN_MODULES
Rerun checks for an environment variable called $RERUN_MODULES
that specifies a directory of rerun modules.
If $RERUN_MODULES
is not set, rerun checks the current working directory for a
subdirectory called "modules".
RERUN_LOGS
Path to directory where rerun will write log files
RERUN_COLOR
Set 'true' if you want ANSI text effects
Single user setup
A single user setup makes sense when rerun commands are all executed by that user. This might be a human's unix account or it could be a "role" account used for administration tasks (eg. deployment procedures).
Example: Single user rerun setup.
export PATH=$PATH:$HOME/.rerun
export RERUN_MODULES=$HOME/.rerun/modules
export RERUN_LOGS=$HOME/.rerun/logs
[ -t 0 ] && export RERUN_COLOR=true
System wide setup
System wide setup can make sense if rerun is used to manage any system task.
If you're sharing a system wide rerun install with
other users, be sure they have write access to the RERUN_LOGS
directory (e.g., perhaps through group membership).
Also, take care to define policy around who can execute
rerun and what modules they are allowed to see.
Example: System wide rerun setup.
# Copy rerun to /usr/bin/rerun
export RERUN_MODULES=/var/rerun/modules
export RERUN_LOGS=/var/rerun/logs
export RERUN_COLOR=false
Rerun's listing feature is available through Bash command completion.
To enable it, update your .bash_profile
with a line like so:
[ -r /path/to/rerun/bash_completion ] && { . /path/to/rerun/bash_completion ; }
See README.md for general usage information.
The stubbs module is included and you'll find it useful to create your own modules.