summaryrefslogtreecommitdiff
path: root/plugins/repo
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 /plugins/repo
parent56d4ab21576bcc3049f62374597b7a5f47a560ab (diff)
it builds!
Diffstat (limited to 'plugins/repo')
-rw-r--r--plugins/repo/Makefile.in10
-rw-r--r--plugins/repo/commit.f.sh2
-rw-r--r--plugins/repo/get.d.sh8
3 files changed, 12 insertions, 8 deletions
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"