1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
#!/usr/bin/make -f
VERSIONS ?= $(shell wget -q -O - "http://omahaproxy.appspot.com/all?os=linux" |awk -F, '/^linux/ { if ($$2!="stable") {print $$4} else {print $$3} }')
$(warning $(VERSIONS))
all: upstream start-reaper-timer pump reap
rm -f launchpad-translations-*.patch
set -x; for v in $$(ls -1d upstream/cr* |cut -d/ -f2); do diff --unified --show-function-line="=" --recursive --minimal --unidirectional-new-file upstream/$$v results/cr |sed -e 's,^--- upstream/,--- ,' -e 's,+++ results/,+++ ,' >launchpad-translations-$$v.patch; done
lint:
pylint --disable=C0301,C0103,E1120,W0621,C0321,W0142 --reports=n --include-ids=y process-and-export fileformats
start-reaper-timer: upstream
@touch -d "3 seconds ago" upstream/reaper-mark
reap:
@find upstream -maxdepth 2 -name reapable-tag -not -newer $(CURDIR)/upstream/reaper-mark -exec echo This {} looks like a dir from a previous run that isn\'t needed any more. \; #-ok rm -rf "{}/.." \;
@find upstream -maxdepth 1 -name tar-\*z -not -newer $(CURDIR)/upstream/reaper-mark -exec echo This {} looks like a file from a previous run that isn\'t needed any more. \; #-ok rm -rf "{}" \;
pump: $(addprefix upstream/cr-,$(VERSIONS)) upstream/lp
@echo Want $(VERSIONS).
for x in $^; do test ! -d $$x || touch $$x/reapable-tag; done
mkdir -p results/cr results/lp
rm -f run.log; ./process-and-export -v $(foreach srcdir,$^,--chromium_source=$(srcdir)) --chromium_destination=results/cr --launchpad_source=chromium-translations-exports.head --launchpad_destination=results/lp
upstream:
@mkdir $@
results:
@mkdir $@
results/lp: results
bzr branch http://bazaar.launchpad.net/~chromium-team/chromium-browser/chromium-translations.head $@
rm -r $@/*/*
results/cr: results
bzr branch lp:chromium-browser/translations $@
# find $@ -type f -name \*.po -delete
# find $@ -type f -name \*.pot -delete
# rmdir $@/*
upstream/lp: upstream
test -d $@ || bzr branch http://bazaar.launchpad.net/~chromium-team/chromium-browser/chromium-translations-exports.head $@
-cd $@ && bzr pull http://bazaar.launchpad.net/~chromium-team/chromium-browser/chromium-translations-exports.head
upstream/cr-%: upstream/tar-%.txz
@t=$$(mktemp -d); tar xvf "$<" --strip-components=1 -C $$t --wildcards \*.grd \*.xtb \*.grdp \*/policy_templates.json && mv $$t "$@";
upstream/tar-%.txz:
test -f "../chromium-browser_$*.orig.tar.xz" && ln -v "../chromium-browser_$*.orig.tar.xz" "$@" || wget -nv --progress=dot:mega -O "$@" https://commondatastorage.googleapis.com/chromium-browser-official/chromium-$*.tar.xz || { rm -f "$@"; echo "Inspect https://commondatastorage.googleapis.com/chromium-browser-official/?prefix=chromium-$* and http://omahaproxy.appspot.com/all?os=linux"; exit 1; }
.PHONY: all pump clean start-reaper-timer reap
.INTERMEDIATE: upstream/tar-%.txz
.NOTPARALLEL:
|