summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2009-07-28 03:10:53 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-06-26 00:30:12 -0600
commit9cc5fe6c84622c1c67566b03152ef55ccce2e4db (patch)
treeee16f7d9e17f9f3ebc1f054fce015ea2c420c021
parent87348edd1b6f1e0f79f76d0c95676214396a5fcd (diff)
one mor commit before push
-rw-r--r--plugins/repo/Makefile.orig2
-rw-r--r--plugins/users/Makefile.orig2
-rw-r--r--plugins/users/init.sh2
-rw-r--r--rvs.sh34
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 <lukeshu@sbcglobal.net>.
-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 <lukeshu@sbcglobal.net>.
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