aboutsummaryrefslogtreecommitdiff
path: root/exp/Makefile
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2021-09-30 19:06:33 +0200
committern-peugnet <n.peugnet@free.fr>2021-09-30 19:06:33 +0200
commitcda8a65123b95b1c59fd43cec8a0863b484c5deb (patch)
treec4849b9b21dd475b574302043e1b83ddab85841c /exp/Makefile
parent3e88cb43928e2368acd669913c3bf32693174764 (diff)
downloaddna-backup-cda8a65123b95b1c59fd43cec8a0863b484c5deb.tar.gz
dna-backup-cda8a65123b95b1c59fd43cec8a0863b484c5deb.zip
move script in its own file for comfort
and start making some stats
Diffstat (limited to 'exp/Makefile')
-rw-r--r--exp/Makefile31
1 files changed, 16 insertions, 15 deletions
diff --git a/exp/Makefile b/exp/Makefile
index f5a9a4c..a8f9675 100644
--- a/exp/Makefile
+++ b/exp/Makefile
@@ -1,23 +1,24 @@
REPO_URL := https://club1.fr/~nicolas/git/dna-backup/
-TEMP_TEMPLATE := dna-backup-bench-XXXXX
-MKTEMP := mktemp --tmpdir -d $(TEMP_TEMPLATE)
-
REPO_PATH := repo
GIT_PATH := git
GITC := git -C $(REPO_PATH)
-.PHONY: apply
-apply: TEMP := $(shell $(MKTEMP))
-apply: commits
- $(MAKE) -C .. dna-backup
- cat $< | while read i; do \
- $(GITC) checkout `echo "$$i" | cut -f1`; \
- ../dna-backup commit -v 2 $(REPO_PATH) $(TEMP); \
- done
- du -bad 2 $(TEMP)
-
-commits: Makefile | repo git
+.PHONY: all
+all: versions
+ @echo "total size : `awk '{s+=$$1}END{print s}' $<`"
+ @echo "version count : `wc -l $<`"
+
+versions: results
+ grep [0-9]$$ $< | cut -f1 > $@
+
+results: commits ../dna-backup
+ ./exp.sh $< $(REPO_PATH) 1| sort -k2 >$@
+
+../dna-backup: .FORCE
+ @$(MAKE) -C .. --no-print-directory dna-backup
+
+commits: | repo git
$(GITC) log --reverse --no-merges --pretty=tformat:"%H %as" \
| sort --unique --key=2 \
> $@
@@ -30,6 +31,6 @@ repo git:
.PHONY: clean
clean:
rm -rf $(REPO_PATH) $(GIT_PATH)
- rm -f commits
+ rm -f commits results versions
.FORCE: ;