summaryrefslogtreecommitdiff
path: root/plugins/repo
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/repo')
-rw-r--r--plugins/repo/Makefile.orig44
-rw-r--r--plugins/repo/commit.d.sh2
-rw-r--r--plugins/repo/commit.f.sh2
-rw-r--r--plugins/repo/commit.sh2
-rw-r--r--plugins/repo/get.d.sh2
-rw-r--r--plugins/repo/get.f.sh2
-rw-r--r--plugins/repo/get.sh2
-rw-r--r--plugins/repo/lib/stdio.sh2
8 files changed, 36 insertions, 22 deletions
diff --git a/plugins/repo/Makefile.orig b/plugins/repo/Makefile.orig
index 00ffc5f..e4114be 100644
--- a/plugins/repo/Makefile.orig
+++ b/plugins/repo/Makefile.orig
@@ -13,6 +13,7 @@ name = repo
# Variables ########################################################
RM ?= rm -f
CP ?= cp
+SED ?= sed
INSTALL = install
MKDIR ?= $(INSTALL) -d #mkdir -p
INSTALL_PROGRAM ?= $(INSTALL)
@@ -22,10 +23,11 @@ SHELL ?= @SHELL@
rvsdir ?= @rvsdir@/rvs
srcdir ?= @srcdir@
-libdir = $(rvsdir)/$(name)
+libdir = $(rvsdir)/$(name)
reldir = plugins/$(name)
-VPATH = $(srcdir)/$(reldir)
+mysrcdir = $(srcdir)/$(reldir)
+VPATH = $(mysrcdir)
# phony targets ####################################################
all : $(name)
@@ -33,30 +35,42 @@ all : $(name)
.SUFFIXES :
# targets ##########################################################
-srcFiles = $(filter-out %/Makefile.orig,$(shell find $(VPATH)/ -type f))
-shFiles = $(patsubst $(VPATH)/%,%,$(basename $(filter %.sh,$(srcFiles))))
+srcFiles = $(filter-out %/Makefile.orig,$(shell find $(mysrcdir)/ -type f))
-$(name) : $(shFiles)
-#$(name) :
+shSrcFiles = $(filter %.sh,$(srcFiles))
+shOutFiles = $(patsubst $(mysrcdir)/%,%,$(basename $(shSrcFiles)))
+shExeFiles = $(patsubst %,$(libdir)/%, $(shOutFiles) )
+$(name) : $(shOutFiles)
-# install/clean/remove #############################################
+# (un)install ######################################################
-#install :
+install : $(shExeFiles)
+ echo $(name) >> $(rvsdir)/plugins
+
+uninstall :
+ $(RM) -r $(libdir)
+ $(SED) -i "/^$(name)$/ d" $(rvsdir)/plugins
+
+# clean ############################################################
clean :
- $(RM) -r ./*
- $(RM) Makefile
+ $(RM) $(shOutFiles)
-remove :
- $(RM) -r $(libdir)
+distclean : clean
+ $(RM) Makefile
# implicit rules ###################################################
-# 'build' shell scripts
-% : %.sh
+b := @
+# build shell scripts
+% : $(mysrcdir)/%.sh
+ $(MKDIR) $(dir $@)
+ $(SED) 's/$bSHELL@/$(subst /,\/,$(SHELL))/g' <$< > $@
+# workaround... idk why it doesn't match `lib/'
+lib/% : $(mysrcdir)/lib/%.sh
$(MKDIR) $(dir $@)
- $(CP) $< $@
+ $(SED) 's/$bSHELL@/$(subst /,\/,$(SHELL))/g' <$< > $@
# install
$(libdir)/% : %
diff --git a/plugins/repo/commit.d.sh b/plugins/repo/commit.d.sh
index 7cfe98a..eabdc78 100644
--- a/plugins/repo/commit.d.sh
+++ b/plugins/repo/commit.d.sh
@@ -1,4 +1,4 @@
-#!$$SHELL$$
+#!@SHELL@
name='rvs commit.d'
ver='0.7.0'
# Copyright (C) 2009 Luke Shumaker
diff --git a/plugins/repo/commit.f.sh b/plugins/repo/commit.f.sh
index c3a652c..bb4a7d8 100644
--- a/plugins/repo/commit.f.sh
+++ b/plugins/repo/commit.f.sh
@@ -1,4 +1,4 @@
-#!$$SHELL$$
+#!@SHELL@
name='rvs commit.f'
ver='0.7.0'
# Copyright (C) 2009 Luke Shumaker
diff --git a/plugins/repo/commit.sh b/plugins/repo/commit.sh
index e5e8eba..fbfd7ca 100644
--- a/plugins/repo/commit.sh
+++ b/plugins/repo/commit.sh
@@ -1,4 +1,4 @@
-#!$$SHELL$$
+#!@SHELL@
name='rvs commit'
ver='0.7.0'
# Copyright (C) 2009 Luke Shumaker
diff --git a/plugins/repo/get.d.sh b/plugins/repo/get.d.sh
index 77107c2..98c490c 100644
--- a/plugins/repo/get.d.sh
+++ b/plugins/repo/get.d.sh
@@ -1,4 +1,4 @@
-#!$$SHELL$$
+#!@SHELL@
name='rvs get.d'
ver='0.7.0'
# Copyright (C) 2009 Luke Shumaker
diff --git a/plugins/repo/get.f.sh b/plugins/repo/get.f.sh
index f6ab761..37d7b26 100644
--- a/plugins/repo/get.f.sh
+++ b/plugins/repo/get.f.sh
@@ -1,4 +1,4 @@
-#!$$SHELL$$
+#!@SHELL@
name='rvs get.f'
ver='0.7.0'
# Copyright (C) 2009 Luke Shumaker
diff --git a/plugins/repo/get.sh b/plugins/repo/get.sh
index e1289f7..5618d0a 100644
--- a/plugins/repo/get.sh
+++ b/plugins/repo/get.sh
@@ -1,4 +1,4 @@
-#!$$SHELL$$
+#!@SHELL@
name='rvs get'
ver='0.7.0'
# Copyright (C) 2009 Luke Shumaker
diff --git a/plugins/repo/lib/stdio.sh b/plugins/repo/lib/stdio.sh
index e20cb7f..f85b7fa 100644
--- a/plugins/repo/lib/stdio.sh
+++ b/plugins/repo/lib/stdio.sh
@@ -1,4 +1,4 @@
-#!$$SHELL$$
+#!@SHELL@
#name='rvs stdio'
#ver='0.7.0'
# Copyright (C) 2009 Luke Shumaker