summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HACKING1
-rw-r--r--Makefile.orig92
-rw-r--r--README1
-rw-r--r--Variables5
-rwxr-xr-xconfigure107
-rw-r--r--src/core/init.sh29
-rw-r--r--src/core/plugins2
-rw-r--r--src/core/plugins.d/repo/commit.d.sh23
-rw-r--r--src/core/plugins.d/repo/commit.f.sh24
-rw-r--r--src/core/plugins.d/repo/commit.sh51
-rw-r--r--src/core/plugins.d/repo/get.d.sh30
-rw-r--r--src/core/plugins.d/repo/get.f.sh20
-rw-r--r--src/core/plugins.d/repo/get.sh32
-rw-r--r--src/core/plugins.d/repo/lib/stdio.sh58
-rw-r--r--src/core/plugins.d/users/mkuser.sh24
-rw-r--r--src/core/plugins.d/users/rmuser.sh14
-rw-r--r--src/core/repo.sh26
-rw-r--r--src/rvs.sh64
18 files changed, 114 insertions, 489 deletions
diff --git a/HACKING b/HACKING
index f7caf04..15c5beb 100644
--- a/HACKING
+++ b/HACKING
@@ -1,3 +1,4 @@
+#!/bin/more
//////////////////////////////////////////////////////////////////////
rvs 0.6.3
retroactive versioning system
diff --git a/Makefile.orig b/Makefile.orig
index 975cb06..9b8473d 100644
--- a/Makefile.orig
+++ b/Makefile.orig
@@ -1,4 +1,4 @@
-#
+#!/usr/bin/make -f
# rvs Makefile
# version 0.7.0
# Copyright (C) 2009 Luke Shumaker
@@ -10,66 +10,80 @@
# Originally written by Luke Shumaker <lukeshu@sbcglobal.net>.
-# Make Programs #####################################################
+# Variables ########################################################
RM = rm -f
CP = cp
-MKDIR = mkdir -p
INSTALL = install
-PRE = @@pre@@ # code pre-processor
-
-# Variables ########################################################
-SHELL = $$SHELL$$
-prefix = $$prefix$$
-bindir = $$bindir$$
-libdir = $$libdir$$
-sourcedir = @@sourcedir@@
-
-# Targets ##########################################################
-
-rvs : wrapper core
-
-.PHONY : rvs install clean remove wrapper i-wrapper core i-core
+MKDIR = $(INSTALL) -d #mkdir -p
+INSTALL_PROGRAM = $(INSTALL)
+INSTALL_DATA = $(INSTALL) -m 644
+TOUCH = touch
+export RM CP INSTALL MKDIR INSTALL_PROGRAM INSTALL_DATA
+
+SHELL = @SHELL@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+bindir = @bindir@
+sbindir = @sbindir@
+rvsdir = @rvsdir@/rvs
+srcdir = @srcdir@
+export SHELL rvsdir srcdir
+
+plugins = $(shell find $(srcdir)/plugins/* -maxdepth 0 -type d)
+
+# phony targets ####################################################
+make-plugins = $(addprefix make-,$(plugins))
+install-plugins = $(addprefix install-,$(plugins))
+remove-plugins = $(addprefix remove-,$(plugins))
+all-plugins = $(make-plugins) $(install-plugins) $(remove-plugins)
+all : rvs $(make-plugins)
+.PHONY : rvs install clean remove $(all-plugins)
.SUFFIXES :
-wrapper : out/rvs
+# targets ##########################################################
-core : shellScripts
+rvs : out/rvs out/plugins/plugins
-srcFiles = $(shell find $(sourcedir)/src/core/ -type f)
-outFiles = $(patsubst $(sourcedir)/src/%,out/%,${basename $(srcFiles)})
-libFiles = $(patsubst out/core/%,$(libdir)/%, $(outFiles) )
-shellScripts : $(outFiles)
-
-# install
-
-install : rvs i-wrapper i-core
-
-i-wrapper : $(prefix)/$(bindir)/rvs
+out/plugins/plugins : $(srcdir)/src/plugins/plugins $(PRE)
+ $(MKDIR) $(dir $@)
+ $(PRE) <$< > $@
+$(rvsdir)/plugins :
+ $(MKDIR) -d $(dir $@)
+ $(TOUCH) $@
-i-core : $(libFiles)
+# install/clean/remove #############################################
-# clean/remove
+install : $(prefix)/$(bindir)/rvs $(rvsdir)/plugins $(install-plugins)
clean :
- $(RM) -r tmp
$(RM) -r out
+ $(RM) var.sed
$(RM) Makefile
remove :
$(RM) $(prefix)/$(bindir)/rvs
- $(RM) -r $(libdir)
+ $(RM) -r $(rvsdir)
-# implicit rules
+# implicit rules ###################################################
-out/% : $(sourcedir)/src/%.sh $(PRE)
+# 'build' shell scripts
+out/% : $(srcdir)/%.sh
$(MKDIR) $(dir $@)
$(PRE) <$< > $@
+# install
$(prefix)/$(bindir)/% : out/%
- $(INSTALL) -m 755 -o root -g root -T $< $@
+ $(MKDIR) $(dir $@)
+ $(INSTALL_PROGRAM) $< $@
+
+# make plugins
+make-% : $(srcdir)/plugins/%
+ $(MAKE) -C $($<
-$(libdir)/% : out/core/%
- $(INSTALL) -m 755 -o root -g root -d $(dir $@)
- $(INSTALL) -m 755 -o root -g root -T $< $@
+# install plugins
+install-% : make-%
+ $(MAKE) -C $< install
+
+#remove-%
diff --git a/README b/README
index d12d484..f839aae 100644
--- a/README
+++ b/README
@@ -1,3 +1,4 @@
+#!/bin/more
//////////////////////////////////////////////////////////////////////
rvs 0.6.3
retroactive versioning system
diff --git a/Variables b/Variables
deleted file mode 100644
index c84887b..0000000
--- a/Variables
+++ /dev/null
@@ -1,5 +0,0 @@
-VER '0.7.0'
-SHELL '/usr/bin/env bash'
-prefix "$HOME"
-bindir 'bin'
-libdir '/etc/rvs'
diff --git a/configure b/configure
index 43adb5f..3cb0b29 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#!/bin/sh
-# rvs configureation script
+name='configure' # rvs configureation script
# version 0.7.0
# Copyright (C) 2009 Luke Shumaker
# This program is distributed in the hope that it will be useful,
@@ -9,59 +9,70 @@
#
# Originally written by Luke Shumaker <lukeshu@sbcglobal.net>.
-sourcedir=`dirname "$0"`
-pre='./var.sed'
+ _srcdir=$(readlink -f `dirname "$0"`)
+ _SHELL='/bin/sh'
+ _prefix='/usr/local'
+_exec_prefix='$(prefix)'
+ _bindir='$(exec_prefix)/bin'
+ _sbindir='$(exec_prefix)/sbin'
+ rvsdir='/etc'
-while [ $# -gt 0 ]; do case "$1" in
- --*)
- var0=`echo "$1" | sed -e 's/^--//' -e 's/=.*$//'`
- match='false'
- while read line; do
- var1=`echo "$line" | cut -f 1 `
- if [ "$var0" == "$var1" ]; then
- match='true'
- break;
+vars='srcdir SHELL prefix exec_prefix bindir sbindir rvsdir'
+
+error() {
+ echo "$name: $1" >> /dev/stderr
+ exit 1
+}
+
+args=`getopt -n "$name" -o "${sopt}" -l "${lopt}${vars}" -- "$@"`
+if [ $? == 0 ]; then
+ set -- $args
+ while [ $# -gt 0 ]; do case "$1" in
+ --) break;;
+ --*)
+ var0="${1/--/}"
+ match='false'
+ for var1 in $vars; do
+ if [ "$var0" == "$var1" ]; then
+ match='true'
+ break;
+ fi
+ done
+ if [ "$match" == 'true' ]; then
+ val="$2"
+ eval _$var0=$val
+ else
+ error "option \`$1' not recognized";
fi
- done < Variables
- if [ "$match" == 'false' ]; then
- echo "configure: option \`$1' not recognized"
- exit 255;
- else
- val=`echo "$1" | sed -e "s/^--$var0=//"`
- eval _$var0=$val
- fi
- :;;
- *) echo "configure: option \`$1' not recognized"; exit 255;;
+ :;;
+ *) error "option \`$1' not recognized";;
esac
shift
-done
+ done
+else
+ error 'unable to parse command line arguments'
+fi
-echo '#!/bin/sed -f' > "$pre"
-while read line; do
- var=`echo "$line" | cut -f 1 `
- val=$(eval echo `echo "$line" | cut -f 2-`) # load from Variables file
- val=$(eval echo '${'`echo _$var`-$val'}') # check for option overide
+echo '#!/bin/sed -f' > var.sed
+for var in $vars; do
+ var1="_$var"
+ val=${!var1}
- # evaluate the values, so that we may use env variables as values
- # escape slashes, as they cause problems for sed
- var=`echo "$var" | sed 's:/:\\\\/:g'`
- val=`echo "$val" | sed 's:/:\\\\/:g'`
+ var=${var//':'/'\:'}
+ val=${val//':'/'\:'}
- echo 's/$$'"${var}"'$\$/'"${val}"'/' >> "$pre"
- #sed -i.bak 's/$$'"${var}"'$\$/'"${val}"'/' "$files"
- unset var val
-done < "$sourcedir/Variables"
+ echo "s:@$var@:$val:g" >> var.sed
+done
-chmod +x "$pre"
-"$pre" < "$sourcedir/Makefile.orig" > Makefile
+echo "11 a# DO NOT edit this file, it has been generated by configure, and will
+11 a# be overwritten. Instead, edit the file \`Makefile.orig'" >> var.sed
+
+Makefiles=`find "${_srcdir}/" -regextype posix-extended \
+-regex '(.*/)?Makefile\.orig' -type f`
+
+for orig in $Makefiles; do
+ new=${orig/%.orig/}
+ new=${new/#$_srcdir/}
+ sed -f var.sed < "${orig}" > "${new}"
+done
-n0='# DO NOT edit this file, it has been generated by configure, and will be'
-n1='# overwritten. Instead, edit the file `Makefile.orig'\'
-sourcedir=`echo "$sourcedir" | sed 's:/:\\\\/:g'`
- pre=`echo "$pre" | sed 's:/:\\\\/:g'`
-sed -i \
--e "11 a$n0" \
--e "11 a$n1" \
--e "s/@@sourcedir@@/$sourcedir/" \
--e "s/@@pre@@/$pre/" \
-Makefile
diff --git a/src/core/init.sh b/src/core/init.sh
deleted file mode 100644
index dc8a750..0000000
--- a/src/core/init.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!$$SHELL$$
-name='rvs init'
-ver='0.7.0'
-# Copyright (C) 2009 Luke Shumaker
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# Originally written by Luke Shumaker <lukeshu@sbcglobal.net>.
-
-repo=`rvs repo`
-if [ "$old" = '' ]; then
- repo='.rvs'
- install -d "$repo"
-fi
-
-if diff -q $RVSDIR/plugins $repo/plugins; then
- install -T $RVSDIR/plugins $repo/plugins
- while read plugin; do
- if [ ! -e "$repo/$plugin" ]; then
- install -d "$repo/$plugin"
- if [ -e "$RVSDIR/$plugin/init" ]; then
- $RVSDIR/$plugin/init
- fi
- fi
- done < $repo/plugins
-fi
-
diff --git a/src/core/plugins b/src/core/plugins
deleted file mode 100644
index 18b388a..0000000
--- a/src/core/plugins
+++ /dev/null
@@ -1,2 +0,0 @@
-repo
-users
diff --git a/src/core/plugins.d/repo/commit.d.sh b/src/core/plugins.d/repo/commit.d.sh
deleted file mode 100644
index 5b2d3fd..0000000
--- a/src/core/plugins.d/repo/commit.d.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!$$SHELL$$
-name='rvs commit.d'
-ver='0.7.0'
-# Copyright (C) 2009 Luke Shumaker
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# Originally written by Luke Shumaker <lukeshu@sbcglobal.net>.
-
-# commit.d DIRNAME
-dir="$1"
-
-tmp=`tempfile`
-for file in $dir/*; do
- hash=`rvs commit "$file"`
- echo "$file:$hash" >> "$tmp"
-done
-
-rvs commit.f "$tmp"
-rm "$tmp"
-
diff --git a/src/core/plugins.d/repo/commit.f.sh b/src/core/plugins.d/repo/commit.f.sh
deleted file mode 100644
index 915ba3c..0000000
--- a/src/core/plugins.d/repo/commit.f.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!$$SHELL$$
-name='rvs commit.f'
-ver='0.7.0'
-# Copyright (C) 2009 Luke Shumaker
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# Originally written by Luke Shumaker <lukeshu@sbcglobal.net>.
-
-source "$RVSDIR/lib/stdio"
-source "$RVSDIR/lib/rvsdb"
-
-# commit.f FILENAME
-file="$1"
-
-#hash=`md5sum $file | sed "s/ .*$//"`
-hash=`sha1sum $file | sed "s/ .*$//"`
-if [ ! -f "`rvs repo`/files/$hash" ]; then
- install -m 644 -o $USER -g $USER -T "$file" "`rvs repo`/files/$hash"
-fi
-echo "$hash"
-
diff --git a/src/core/plugins.d/repo/commit.sh b/src/core/plugins.d/repo/commit.sh
deleted file mode 100644
index 0c8cfc5..0000000
--- a/src/core/plugins.d/repo/commit.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-#!$$SHELL$$
-name='rvs commit'
-ver='0.7.0'
-# Copyright (C) 2009 Luke Shumaker
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# Originally written by Luke Shumaker <lukeshu@sbcglobal.net>.
-
-source "$RVSDIR/lib/stdio"
-
-# commit FILE
-if [ $# -gt 0 ]; then
- file="$1"
-else
- file='.'
-fi
-
-warn "$file"
-
-if [ ! -e $file ]; then error "file \`$file' does not exist";
-# START file type list
-elif [ -L $file ]; then type='l'; # symbolic link
-elif [ -b $file ]; then type='b'; # block (buffered) special
-elif [ -c $file ]; then type='c'; # character (unbuffered) special
-elif [ -d $file ]; then type='d'; # directory
-elif [ -p $file ]; then type='p'; # named pipe (FIFO)
-elif [ -f $file ]; then type='f'; # regular file
-elif [ -s $file ]; then type='s'; # socket
-#elif [ -D $file ]; type='D'; # door (Solaris only)
-# END file type list
-else error "could not identify file type of \`$file'"
-fi
-
-ret=`rvs "commit.$type" "$file"`
-
-tmp=`tempfile`
-cat << __EOF__ > "$tmp"
-name:$file
-hash:$ret
-type:$type
-author:$user
-owner:$owner
-license:$license
-__EOF__
-
-rvs commit.f "$tmp"
-rm "$tmp"
-
diff --git a/src/core/plugins.d/repo/get.d.sh b/src/core/plugins.d/repo/get.d.sh
deleted file mode 100644
index 2443850..0000000
--- a/src/core/plugins.d/repo/get.d.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#!$$SHELL$$
-name='rvs get.d'
-ver='0.7.0'
-# Copyright (C) 2009 Luke Shumaker
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# Originally written by Luke Shumaker <lukeshu@sbcglobal.net>.
-
-#source "$RVSDIR/lib/stdio"
-source "$RVSDIR/lib/rvsdb"
-
-# get.d ID DIRNAME
-id="$1"
-dir="$2"
-
-tmp=`tempfile`
-rvs get.f `logread "$db" 'hash'` "$tmp"
-
-mkdir "$dir"
-while read line; do
- hash=`echo "$line" | sed 's/^.*://'`
- name=`echo "$line" | sed "s/:$hash$//"`
- rvs get "$dir/$file"
-done < "$tmp"
-
-rm "$tmp"
-
diff --git a/src/core/plugins.d/repo/get.f.sh b/src/core/plugins.d/repo/get.f.sh
deleted file mode 100644
index e631a1f..0000000
--- a/src/core/plugins.d/repo/get.f.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!$$SHELL$$
-name='rvs get.f'
-ver='0.7.0'
-# Copyright (C) 2009 Luke Shumaker
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# Originally written by Luke Shumaker <lukeshu@sbcglobal.net>.
-
-source "$RVSDIR/lib/stdio"
-source "$RVSDIR/lib/rvsdb"
-
-# get.f ID FILENAME
-id="$1"
-file="$2"
-
-cp "`rvs repo`/files/$id" "$file"
-
diff --git a/src/core/plugins.d/repo/get.sh b/src/core/plugins.d/repo/get.sh
deleted file mode 100644
index 4317c40..0000000
--- a/src/core/plugins.d/repo/get.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!$$SHELL$$
-name='rvs get'
-ver='0.7.0'
-# Copyright (C) 2009 Luke Shumaker
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# Originally written by Luke Shumaker <lukeshu@sbcglobal.net>.
-
-source "$RVSDIR/lib/stdio"
-source "$RVSDIR/lib/rvsdb"
-
-# get ID [FILE]
-id="$1"
-
-if [ $# -gt 1 ]; then
- file="$2"
-fi
-
-tmp=`tempfile`
-rvs get.f "$id" "$tmp"
-type=`logread "$tmp" 'type'`
-if [ $# -gt 1 ]; then
- file="$2"
-else
- file=`logread "$tmp" 'name'`
-fi
-
-rvs "get.$type" "$id" "$file"
-
diff --git a/src/core/plugins.d/repo/lib/stdio.sh b/src/core/plugins.d/repo/lib/stdio.sh
deleted file mode 100644
index e6ef31a..0000000
--- a/src/core/plugins.d/repo/lib/stdio.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-#!$$SHELL$$
-#name='rvs stdio'
-#ver='0.7.0'
-# Copyright (C) 2009 Luke Shumaker
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# Originally written by Luke Shumaker <lukeshu@sbcglobal.net>.
-
-verbose() {
- if [ "$volume" == '-v' ]; then
- echo $@
- fi
-}
-
-out() {
- if [ "$volume" != '-q' ]; then
- echo $@
- fi
-}
-
-warn () {
- echo "$name: $1" >> /dev/stderr
-}
-
-error() {
- warn "$1"
- cat << __error__ >> /dev/stderr
-Usage: $name $usage
-
-Try \`$name --help\' for more options.
-__error__
- exit 1
-}
-
-fatal () {
- warn "$1"
- exit 1
-}
-
-version() {
- echo "$name $ver"
- if [ "$volume" != '-q' ]; then
- cat << __disclaimer__
-$name is copyright (C) 2009 Luke Shumaker
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-Originally written by Luke Shumaker <lukeshu@sbcglobal.net>.
-__disclaimer__
- fi
- exit 0
-}
-
diff --git a/src/core/plugins.d/users/mkuser.sh b/src/core/plugins.d/users/mkuser.sh
deleted file mode 100644
index 74c8a77..0000000
--- a/src/core/plugins.d/users/mkuser.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!$$SHELL$$
-name='rvs mkuser'
-ver='0.7.0'
-# Copyright (C) 2009 Luke Shumaker
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# Originally written by Luke Shumaker <lukeshu@sbcglobal.net>.
-
-read -p 'username: ' author
-read -p 'give copyright to: ' owner
-if [ "$owner" != 'Public Domain' ]; then
- read -p 'use the license: ' license
-else
- license=''
-fi
-cat << __EOF__ > "`rvs repo`/users/$author"
-author:$author
-owner:$owner
-license:$license
-__EOF__
-
diff --git a/src/core/plugins.d/users/rmuser.sh b/src/core/plugins.d/users/rmuser.sh
deleted file mode 100644
index 82a71c5..0000000
--- a/src/core/plugins.d/users/rmuser.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!$$SHELL$$
-name='rvs rmuser'
-ver='0.7.0'
-# Copyright (C) 2009 Luke Shumaker
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# Originally written by Luke Shumaker <lukeshu@sbcglobal.net>.
-
-uname=$1
-rm "`rvs repo`/users/$uname"
-
diff --git a/src/core/repo.sh b/src/core/repo.sh
deleted file mode 100644
index a94ccb8..0000000
--- a/src/core/repo.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!$$SHELL$$
-name='rvs repo'
-ver='0.7.0'
-# Copyright (C) 2009 Luke Shumaker
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# Originally written by Luke Shumaker <lukeshu@sbcglobal.net>.
-
-repo='.rvs'
-pwd=`pwd`
-
-while [ "$pwd" != "`pwd`" ] && [ ! -e "`pwd`/$repo" ]; do
- pwd=`pwd`
- cd ..
-done
-
-if [ -e "`pwd`/$repo" ]; then
- echo "`pwd`/$repo"
-else
- echo "$name: no rvs repository found" >> /dev/stderr
- exit 1
-fi
-
diff --git a/src/rvs.sh b/src/rvs.sh
deleted file mode 100644
index f47659f..0000000
--- a/src/rvs.sh
+++ /dev/null
@@ -1,64 +0,0 @@
-#!$$SHELL$$
-name='rvs'
-ver='0.7.0'
-# Copyright (C) 2009 Luke Shumaker
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# Originally written by Luke Shumaker <lukeshu@sbcglobal.net>.
-
-RVSDIR='$$libdir$$'
-REPO=`$RVSDIR/repo`
-
-error() {
- echo "$name: $1" >> /dev/stderr
- exit 1
-}
-
-# START OPTION HANDLING #
-com=$1;
-# END OPTION HANDLING #
-case "$com" in
- '') error 'no command specified';;
- *)
- if [ -f "$RVSDIR/$com" ]; then
- export RVSDIR
- $RVSDIR/$@
- done='yes'
- else
- while read plugin; do
- if [ -f "$RVSDIR/$plugin/$com" ]; then
- export RVSDIR=$RVSDIR/$plugin
- $RVSDIR/$@
- done='yes'
- break
- fi
- done < $REPO/plugins
- fi
- if [ "$done" != 'yes' ]; then
- error "unrecognized command \`$com'"
- fi
- :;;
-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
-