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
|
#!/usr/bin/make -f
all: upstream start-reaper-timer results/cr results/lp work reap
lint:
pylint --disable=C0301,C0103,E1120,W0621,C0321,W0142 --reports=n --include-ids=y process-and-export fileformats
refresh: $(shell wget -q -O - "http://omahaproxy.appspot.com/all?os=linux" |awk -F, '/^linux/ { if ($$2!="stable") {print $$4} else {print $$3} }' |sed -e s,^,upstream/cr-, ) upstream/lp
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 "{}" \;
work: $(wildcard upstream/* )
for x in $^; do test ! -d $$x || touch $$x/reapable-tag; done
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 $@/*/*
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:
@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 work clean start-reaper-timer reap
.INTERMEDIATE: upstream/tar-%.txz
.NOTPARALLEL:
|