From 9cc5fe6c84622c1c67566b03152ef55ccce2e4db Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 28 Jul 2009 03:10:53 -0400 Subject: one mor commit before push --- plugins/repo/Makefile.orig | 2 +- plugins/users/Makefile.orig | 2 +- plugins/users/init.sh | 2 +- rvs.sh | 34 +++++++++++++++++----------------- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/plugins/repo/Makefile.orig b/plugins/repo/Makefile.orig index e4114be..ea9e7a9 100644 --- a/plugins/repo/Makefile.orig +++ b/plugins/repo/Makefile.orig @@ -31,7 +31,7 @@ VPATH = $(mysrcdir) # phony targets #################################################### all : $(name) -.PHONY : $(name) install clean remove +.PHONY : $(name) install uninstall clean distclean .SUFFIXES : # targets ########################################################## diff --git a/plugins/users/Makefile.orig b/plugins/users/Makefile.orig index ab109a7..edac4f0 100644 --- a/plugins/users/Makefile.orig +++ b/plugins/users/Makefile.orig @@ -31,7 +31,7 @@ VPATH = $(mysrcdir) # phony targets #################################################### all : $(name) -.PHONY : $(name) install clean remove +.PHONY : $(name) install uninstall clean distclean .SUFFIXES : # targets ########################################################## diff --git a/plugins/users/init.sh b/plugins/users/init.sh index ce1c6fd..12b2f08 100644 --- a/plugins/users/init.sh +++ b/plugins/users/init.sh @@ -9,7 +9,7 @@ ver='0.7.0' # # Originally written by Luke Shumaker . -cat << __EOF__ > "$repo/Public Domain" +cat << __EOF__ > "$REPO/Public Domain" author:anonymous owner:Public Domain license: diff --git a/rvs.sh b/rvs.sh index 88c4a9b..d020b90 100644 --- a/rvs.sh +++ b/rvs.sh @@ -10,7 +10,6 @@ ver='0.7.0' # Originally written by Luke Shumaker . RVSDIR='@rvsdir@' -REPO=`$RVSDIR/repo` error() { echo "$name: $1" >> /dev/stderr @@ -18,7 +17,7 @@ error() { } repo() { - repo='.rvs' + repo=".$name" pwd=`pwd` owd="$pwd" @@ -30,30 +29,31 @@ repo() { if [ -e "`pwd`/$repo" ]; then echo "`pwd`/$repo" else - echo "$name: no rvs repository found" >> /dev/stderr - exit 1 + error "no $name repository found" >> /dev/stderr fi cd "$owd" } - init() { - repo=`repo` + repo=`repo 2> /dev/null` if [ -z "$repo" ]; then - repo='.rvs' + repo=".$name" 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 + echo "initializing plugin \`$plugin'" + echo 'foo0' + install -d "$repo/$plugin" + echo 'foo1' + export REPO=.rvs/$plugin + echo 'foo2' + if [ -e "$RVSDIR/$plugin/init" ]; then + $RVSDIR/$plugin/init fi + echo 'foo3' done < $repo/plugins + else + error "repository already exists at \`$repo'" fi } @@ -62,7 +62,7 @@ com=$1; # END OPTION HANDLING # case "$com" in '') error 'no command specified';; - 'repo') repo;; + 'repo') repo; exit $?;; 'init') init;; *) if [ -f "$RVSDIR/$com" ]; then @@ -73,7 +73,7 @@ case "$com" in while read plugin; do if [ -f "$RVSDIR/$plugin/$com" ]; then export RVSDIR=$RVSDIR/$plugin - export REPO=$REPO/$plugin + export REPO=`repo`/$plugin $RVSDIR/$@ done='yes' break -- cgit v1.2.3