0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-24 17:12:59 +01:00

Ensure docs makefile downloads theme if failed before. (#3322)

The makefile did not download the theme if the directory "themes/gitea"
is there, even if empty.
On a fresh Ubuntu install, curl is not included, so the theme rule fails
just after creating the empty directory. When you try again after
installing curl, the rule is not triggered.

This could also happen if the download fails for other reasons.

This change makes the theme rule depend on the file "theme.toml"
which will be there only after unpacking a successfully downloaded
theme archive.

Signed-off-by: Alberto González Palomo <bugs@sentido-labs.com>
This commit is contained in:
Alberto González Palomo 2018-01-07 13:11:17 +01:00 committed by Lauris BH
parent 9d8260b3d6
commit 18bb0f8f13

View file

@ -24,6 +24,7 @@ build: $(THEME)
.PHONY: update .PHONY: update
update: $(THEME) update: $(THEME)
$(THEME): $(THEME): $(THEME)/theme.toml
mkdir -p $@ $(THEME)/theme.toml:
curl -s $(ARCHIVE) | tar xz -C $@ mkdir -p $$(dirname $@)
curl -s $(ARCHIVE) | tar xz -C $$(dirname $@)