From 87f0c8dec18eb50d1461d53bf1239c8dda73ed54 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 30 Jul 2009 16:14:54 -0400 Subject: it builds! --- plugins/repo/Makefile.in | 10 +++++----- plugins/repo/commit.f.sh | 2 +- plugins/repo/get.d.sh | 8 ++++++-- 3 files changed, 12 insertions(+), 8 deletions(-) (limited to 'plugins/repo') 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" -- cgit v1.2.3-54-g00ecf