summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2009-07-30 16:14:54 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-06-26 00:30:13 -0600
commit87f0c8dec18eb50d1461d53bf1239c8dda73ed54 (patch)
tree23d7b708973f93ed331f5a18d3e5b9e3f5f6cd56
parent56d4ab21576bcc3049f62374597b7a5f47a560ab (diff)
it builds!
-rw-r--r--Makefile.in13
-rwxr-xr-xconfigure12
-rw-r--r--plugins/repo/Makefile.in10
-rw-r--r--plugins/repo/commit.f.sh2
-rw-r--r--plugins/repo/get.d.sh8
-rw-r--r--plugins/users/Makefile.in58
6 files changed, 54 insertions, 49 deletions
diff --git a/Makefile.in b/Makefile.in
index e26131a..3fb9f42 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,6 +1,6 @@
#!/usr/bin/make -f
name = @name@
-# version 0.7.0
+# version 0.7.1
# 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
@@ -18,7 +18,7 @@ exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
-dirs = $(srcdir) $(prefix) $(exec_prefix) $(bindir) $(sbindir) $(libexecdir)
+dirs = $(srcdir) $(prefix) $(exec_prefix) $(bindir) $(sbindir) $(libexecdir)/$(rvs)
export srcdir prefix exec_prefix bindir sbindir libexecdir
# Programs #########################################################
@@ -52,20 +52,20 @@ all : $(rvs) $(make-plugins)
b := @
$(rvs) : $(srcdir)/rvs.sh
$(SED) \
- -e 's/$bSHELL@/$(subst /,\/,$(SHELL) )/g' \
+ -e 's/$bSHELL@/$(subst /,\/,$(SHELL))/g' \
-e 's/$blibexecdir@/$(subst /,\/,$(libexecdir))/g' \
- -e 's/$bname@/$(subst /,\/,$(name) )/g' \
+ -e 's/$bname@/$(subst /,\/,$(name))/g' \
< $< > $@
$(bindir)/$(rvs) : $(rvs) $(bindir)
$(INSTALL_PROGRAM) $< $@
-$(libexecdir)/$(rvs)/plugins : $(rvsdir)
+$(libexecdir)/$(rvs)/plugins : $(libexecdir)/$(rvs)
$(TOUCH) $@
# install/clean/remove #############################################
-install : install-$(name) $(rvsdir)/plugins $(install-plugins)
+install : install-$(name) $(libexecdir)/$(rvs)/plugins $(install-plugins)
install-$(name) : $(bindir)/$(rvs)
@@ -74,6 +74,7 @@ uninstall :
$(RM) -r $(libexecdir)/$(rvs)
clean :
+ $(RM) var.sed
distclean : clean
$(RM) Makefile
diff --git a/configure b/configure
index 90f4fe6..5497715 100755
--- a/configure
+++ b/configure
@@ -19,7 +19,7 @@ _exec_prefix='$(prefix)'
_libexecdir='$(exec_prefix)/libexec'
_srcdir=$(readlink -f `dirname "$0"`)
-vars='srcdir SHELL prefix exec_prefix bindir sbindir rvsdir'
+vars='name RVS SHELL prefix exec_prefix bindir sbindir libexecdir srcdir'
error() {
echo "$name: $1" >> /dev/stderr
@@ -61,11 +61,11 @@ for var in $vars; do
val=${!var1}
# GNU bash optimized version
- var=${var//':'/'\:'}
- val=${val//':'/'\:'}
+ #var=${var//':'/'\:'}
+ #val=${val//':'/'\:'}
# POSIX version
- #var=`echo "$var" | sed 's@:@\\:@g'`
- #val=`echo "$val" | sed 's@:@\\:@g'`
+ var=`echo "$var" | sed 's@:@\\:@g'`
+ val=`echo "$val" | sed 's@:@\\:@g'`
echo "s:@$var@:$val:g" >> var.sed
done
@@ -82,5 +82,5 @@ for orig in $Makefiles; do
mkdir -p `dirname "$new"`
sed -f var.sed < "${orig}" > "${new}"
done
-rm var.sed
+#rm var.sed
diff --git a/plugins/repo/Makefile.in b/plugins/repo/Makefile.in
index 8105b75..12fb469 100644
--- a/plugins/repo/Makefile.in
+++ b/plugins/repo/Makefile.in
@@ -1,6 +1,6 @@
#!/usr/bin/make -f
name = repo
-# version 0.7.0
+# version 0.7.1
# 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
@@ -39,13 +39,13 @@ all : $(name)
.SUFFIXES :
# main #############################################################
+mysrcdir = $(srcdir)/plugins/$(name)
+myoutdir = out
+
srcFiles = $(filter-out %/Makefile.in,$(shell find $(mysrcdir)/ -type f))
shSrcFiles = $(filter %.sh,$(srcFiles))
-shOutFiles = $(patsubst $(mysrcdir)/%,out/%,$(basename $(shSrcFiles)))
-
-mysrcdir = $(srcdir)/plugins/$(name)
-myoutdor = out
+shOutFiles = $(patsubst $(mysrcdir)/%,$(myoutdir)/%,$(basename $(shSrcFiles)))
$(name) : $(shOutFiles)
diff --git a/plugins/repo/commit.f.sh b/plugins/repo/commit.f.sh
index bb4a7d8..ebc8214 100644
--- a/plugins/repo/commit.f.sh
+++ b/plugins/repo/commit.f.sh
@@ -14,7 +14,7 @@ ver='0.7.0'
# commit.f FILENAME
file="$1"
-#hash=`md5sum $file | sed "s/ .*$//"`
+#hash=`md5sum $file | sed "s/ .*$//"`
hash=`sha1sum $file | sed "s/ .*$//"`
if [ ! -f "$REPO/$hash" ]; then
install -m 644 -o $USER -g $USER -T "$file" "$REPO/$hash"
diff --git a/plugins/repo/get.d.sh b/plugins/repo/get.d.sh
index 98c490c..9ef25b9 100644
--- a/plugins/repo/get.d.sh
+++ b/plugins/repo/get.d.sh
@@ -20,8 +20,12 @@ tmp=`tempfile`
mkdir "$dir"
while read line; do
- hash=`echo "$line" | sed 's/^.*://'`
- name=`echo "$line" | sed "s/:$hash$//"`
+ # GNU bash optimized version
+ #hash=${line/#*:/}
+ #name=${line/%:${hash}/}
+ # POSIX version
+ hash=`echo "$line" | sed 's/^.*://'`
+ name=`echo "$line" | sed "s/:$hash$//"`
"$RVSDIR/get" "$dir/$file"
done < "$tmp"
diff --git a/plugins/users/Makefile.in b/plugins/users/Makefile.in
index 5c97ef2..975d884 100644
--- a/plugins/users/Makefile.in
+++ b/plugins/users/Makefile.in
@@ -1,6 +1,6 @@
#!/usr/bin/make -f
name = users
-# version 0.7.0
+# version 0.7.1
# 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
@@ -10,70 +10,70 @@ name = users
# Originally written by Luke Shumaker <lukeshu@sbcglobal.net>.
-# Variables ########################################################
-RM ?= rm -f
+export rvs ?= @name@
+# Directories ######################################################
+srcdir ?= @srcdir@
+prefix ?= @prefix@
+exec_prefix ?= @exec_prefix@
+bindir ?= @bindir@
+sbindir ?= @sbindir@
+libexecdir ?= @libexecdir@
+#export srcdir prefix exec_prefix bindir sbindir libexecdir
+
+# Programs #########################################################
+RVS ?= @RVS@
+SHELL ?= @SHELL@
+RM ?= rm
CP ?= cp
SED ?= sed
-INSTALL = install
+INSTALL ?= install
MKDIR ?= $(INSTALL) -d #mkdir -p
INSTALL_PROGRAM ?= $(INSTALL)
INSTALL_DATA ?= $(INSTALL) -m 644
-
-SHELL ?= @SHELL@
-rvsdir ?= @rvsdir@/rvs
-srcdir ?= @srcdir@
-
-libdir = $(rvsdir)/$(name)
-reldir = plugins/$(name)
-
-mysrcdir = $(srcdir)/$(reldir)
-VPATH = $(mysrcdir)
+TOUCH ?= touch # This file doesn't use touch
+#export RVS SHELL RM CP SED INSTALL MKDIR INSTALL_PROGRAM INSTALL_DATA TOUCH
# phony targets ####################################################
all : $(name)
.PHONY : $(name) install uninstall clean distclean
.SUFFIXES :
-# targets ##########################################################
+# main #############################################################
+mysrcdir = $(srcdir)/plugins/$(name)
+myoutdir = out
+
srcFiles = $(filter-out %/Makefile.in,$(shell find $(mysrcdir)/ -type f))
shSrcFiles = $(filter %.sh,$(srcFiles))
-shOutFiles = $(patsubst $(mysrcdir)/%,%,$(basename $(shSrcFiles)))
-shExeFiles = $(patsubst %,$(libdir)/%, $(shOutFiles) )
+shOutFiles = $(patsubst $(mysrcdir)/%,$(myoutdir)/%,$(basename $(shSrcFiles)))
$(name) : $(shOutFiles)
# (un)install ######################################################
-install : $(shExeFiles)
- echo $(name) >> $(rvsdir)/plugins
+install : all
+ $(RVS) install $(name) $(myoutdir)
uninstall :
- $(RM) -r $(libdir)
- $(SED) -i "/^$(name)$/ d" $(rvsdir)/plugins
+ $(RVS) uninstall $(name)
# clean ############################################################
clean :
- $(RM) $(shOutFiles)
distclean : clean
$(RM) Makefile
+ $(RM) -r out
# implicit rules ###################################################
b := @
# build shell scripts
-% : $(mysrcdir)/%.sh
+$(myoutdir)/% : $(mysrcdir)/%.sh
$(MKDIR) $(dir $@)
$(SED) 's/$bSHELL@/$(subst /,\/,$(SHELL))/g' <$< > $@
# workaround... idk why it doesn't match `lib/'
-lib/% : $(mysrcdir)/lib/%.sh
+$(myoutdir)/lib/% : $(mysrcdir)/lib/%.sh
$(MKDIR) $(dir $@)
$(SED) 's/$bSHELL@/$(subst /,\/,$(SHELL))/g' <$< > $@
-# install
-$(libdir)/% : %
- $(MKDIR) $(dir $@)
- $(INSTALL_PROGRAM) $< $@
-