summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HACKING95
-rw-r--r--Makefile.in2
-rw-r--r--README57
-rw-r--r--rvs.sh22
4 files changed, 127 insertions, 49 deletions
diff --git a/HACKING b/HACKING
index 15c5beb..7963220 100644
--- a/HACKING
+++ b/HACKING
@@ -1,6 +1,6 @@
#!/bin/more
//////////////////////////////////////////////////////////////////////
- rvs 0.6.3
+ rvs 0.7.0
retroactive versioning system
a versioning system that allows you to check
in commit 2 before commit 1
@@ -14,6 +14,97 @@
hacking
+ build basics
+
+ One of the coolest things about rvs (imo) is how modular and
+ customizable it is. If you wish to create a fork of rvs, it would
+ be a good idea to give it a different name. This can be done
+ without even changing a single source file! Simply run configure
+ with `--name=NAME' option (variables that have `rvs' in the name
+ will not be renamed, but the user will never know this unless they
+ peek ath the code).
+
+ Other options to configure and their default values are:
+ name='rvs'
+ The name of the program. Note that unlike most
+ variables, you should NOT call this in Makefiles
+ (`$(name)'), but use $(rvs) instead.
+ RVS='$(bindir)/$(rvs)'
+ Where the exectuable will be. `$(rvs)' is the same as
+ `$(name)' (see above)
+ SHELL='/bin/sh'
+ The shell that will be used by make, and the shell
+ that scripts will run in. (Perhaps we should make
+ these separate variables?)
+ prefix='/usr/local'
+ Standard GNU variable. Many of you will want to
+ change this to `/usr', or `/home/USER_NAME'
+ exec_prefix='$(prefix)'
+ Standard GNU variable.
+ bindir='$(exec_prefix)/bin'
+ Standard GNU variable.
+ sbindir='$(exec_prefix)/sbin'
+ Standard GNU variable.
+ libexecdir='$(exec_prefix)/libexec'
+ Standard GNU variable. The plugins will be installed
+ at $(libexecdir)/$(name)
+ srcdir=$(readlink -f `dirname "$0"`)
+ Where the source code is. The default value evaluates
+ to the directory of the `configure' script.
+
+ These can either be changed by manually changing `configure' or by
+ running it like:
+ ./configure --VAR_NAME=VALUE
+
+ In this document, the `$(VAR_NAME)' refers to whatever you set the
+ value to.
+
+ The configure script will run on any instance of `Makefile.in' in
+ $(srcdir).
+
+ Currently, rvs is distributed with 2 pluggins. `repo'(sitory) is
+ the core of the rvs file database. `users' handles all usernames,
+ settings, and other info.
+
+ commands
+
+ By itself, rvs does almost nothing. All real functionality is
+ provided by plugins. When you invoke rvs, you do so in the format
+ `rvs COMMAND'. Plugins work by adding new commands.
+
+ Most commands are provided by plugins, however, a few are built in:
+ init
+ Initializes a repository in the current directory. It creates
+ `./.$(name)', and runs any initalizers for
+ plugins.
+ install PLUGIN DIR
+ Installs PLUGIN, for which the files are found in DIR. Unless
+ an older version is already installed, it adds the plugin to
+ have lowest priority (see `$(libexecdir)/$(rvs)/plugins').
+ uninstall PLUGIN
+ Uninstalls PLUGIN. Did that really need to be said?
+
+ A plugin is simply a collection of independant executable files.
+ When rvs is invoked, it looks for the COMMAND in a few places:
+ 1) checks if COMMAND is an built-in command
+ 2) looks at the file `$(libexecdir)/$(rvs)/plugins'. This is a
+ newline-delimited list of plugin names.
+ 3) loops through the directories `$(libexecdir)/$(rvs)/PLUGIN',
+ where PLUGIN is one of the values in
+ `$(libexecdir)/$(rvs)/plugins', in the order they appear in
+ the file.
+ 4) if rvs does not find the command, it reports an error
+
+
+ If you would like to contribute a plugin, or distribute one with a
+ fork, all you have to do is put it in `$(srcdir)/plugins/NAME'. The
+ main Makefile will recognize any directory in `$(srcdir)/plugins/'
+ as a plugin, and will run `make -C `plugins/NAME/Makefile'. It
+ should create a directory (mine use `plugins/NAME/out') to put ALL,
+ and ONLY the final files to be used by that plugin.
+
+========this is outdated but I don't really want to keep editing it ==
+
There are two main parts to rvs, the wrapper, and the core. The
wrapper is a small executable, located in the PATH, and is the one
called when you type `rvs'. The core is a set of many small
@@ -113,7 +204,7 @@
1. incompatible licences can be used for different modules
2. modules can be added/removed on the fly
3. one can use any language to write new modules, without
- having to worry about bindings
+ having to worry about bindings`$(libexecdir)/$(rvs)
$$libdir$$/lib/
THIS WAS WRITTEN FOR rvs 0.6.2
diff --git a/Makefile.in b/Makefile.in
index 3fb9f42..fd7a2fe 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -57,7 +57,7 @@ $(rvs) : $(srcdir)/rvs.sh
-e 's/$bname@/$(subst /,\/,$(name))/g' \
< $< > $@
-$(bindir)/$(rvs) : $(rvs) $(bindir)
+$(RVS) : $(rvs) $(bindir)
$(INSTALL_PROGRAM) $< $@
$(libexecdir)/$(rvs)/plugins : $(libexecdir)/$(rvs)
diff --git a/README b/README
index f839aae..fc90d89 100644
--- a/README
+++ b/README
@@ -32,7 +32,7 @@ system requirements
To my knowledge, this is the absolute requirements (all need to
be in your PATH):
- * GNU bash
+ * a POSIX shell (tested with dash, and GNU BASH)
* cat (included in GNU Core Utils)
* cp (included in GNU Core Utils)
* cut (included in GNU Core Utils)
@@ -60,35 +60,38 @@ building
Configuration
- There are several configuration variables that can be set. The
- default values are kept in the file `Variables'.
-
- Variables is in the format `VAR_NAME<tab>VALUE'. You can modify
- these configuration variables by editing the `Variables' file
- directly, or by running ./configure such as:
+ There are several configuration variables that can be set. You can
+ modify these configuration variables by running ./configure such
+ as:
$ ./configure --VAR_NAME=VALUE
The different configuration variables are as follows:
- VER value='0.6.3'
- rvs's internal varsion number
- SHELL value='/usr/bin/env bash'
- the shell that scripts will be run in.
- prefix value="$HOME"
- where the files will be installed. For me the defualt is
- `/home/luke'. Many of you will want to change this to '/usr'
- bindir value='bin'
- the binaries folder inside the prefix. If I leave the prefix
- and bindir the same, for me rvs is installed in
- `/home/luke/bin'. If I change prefix to '/usr', then rvs will
- be installed in `/usr/bin'
- libdir value='/etc/rvs/'
- where the rvs libraries will be installed. In rvs almost
- nothing is actually done in the execurable you call when you
- type `rvs' ([$prefix]/[$bindir]/rvs) but option handling. All
- the real work is done in modular sub-programs. I call them
- libraries, even though they are independend programs that
- communicate via pipes. Note that they probably should NOT be
- located in your PATH.
+ name='rvs'
+ The name of the program. Note that unlike most
+ variables, you should NOT call this in Makefiles
+ (`$(name)'), but use $(rvs) instead.
+ RVS='$(bindir)/$(rvs)'
+ Where the exectuable will be. `$(rvs)' is the same as
+ `$(name)' (see above)
+ SHELL='/bin/sh'
+ The shell that will be used by make, and the shell
+ that scripts will run in. (Perhaps we should make
+ these separate variables?)
+ prefix='/usr/local'
+ Standard GNU variable. Many of you will want to
+ change this to `/usr', or `/home/USER_NAME'
+ exec_prefix='$(prefix)'
+ Standard GNU variable.
+ bindir='$(exec_prefix)/bin'
+ Standard GNU variable.
+ sbindir='$(exec_prefix)/sbin'
+ Standard GNU variable.
+ libexecdir='$(exec_prefix)/libexec'
+ Standard GNU variable. The plugins will be installed
+ at $(libexecdir)/$(name)
+ srcdir=$(readlink -f `dirname "$0"`)
+ Where the source code is. The default value evaluates
+ to the directory of the `configure' script.
~ Luke Shumaker <LukeShu@sbcglobal.net>
Happy Hacking!
diff --git a/rvs.sh b/rvs.sh
index 3ac3526..df8560c 100644
--- a/rvs.sh
+++ b/rvs.sh
@@ -82,7 +82,7 @@ com=$1;
# END OPTION HANDLING #
case "$com" in
'') error 'no command specified';;
- 'repo') repo; exit $?;;
+ # 'repo') repo; exit $?;;
'init') init; exit $?;;
'install') shift; install $@; exit $?;;
'uninstall') shift; uninstall $@; exit $?;;
@@ -109,22 +109,6 @@ case "$com" in
:;;
esac
-#args=`getopt -n "$name" -o "${sopt}" -l "${lopt}" -- "$@"`
-#if [ $? == 0 ]; then
-# set -- $args
-# while [ $# -gt 0 ]; do
-# case "$1" in
-# -V | --version) mode='version';;
-# -h | -H | -\? | --help) mode='help';;
-#
-# -v | --verbose) volume='-v';;
-# -q | --quiet) volume='-q';;
-#
-# --) shift; break;;
-# esac
-# shift;
-# done
-#else
-# error
-#fi
+# Copy/Paste Virus 1.3c Please copy and paste this text anywhere. Track
+# its progress by searching for this MD5#f7eac285ebfe21c4587bfebb9582f90d