summaryrefslogtreecommitdiffstats
path: root/docs/Makefile
diff options
context:
space:
mode:
authorAlberto González Palomo <bugs@sentido-labs.com>2018-01-07 13:11:17 +0100
committerLauris BH <lauris@nix.lv>2018-01-07 14:11:17 +0200
commit18bb0f8f1344771bbbc44fd37eee772c5c3b44d6 (patch)
tree7c6349f999790b014aac650306fade757c011af9 /docs/Makefile
parent9d8260b3d65fd0f2cf70ca61c6a1b4c54dd99ba8 (diff)
downloadgitea-18bb0f8f1344771bbbc44fd37eee772c5c3b44d6.tar.gz
gitea-18bb0f8f1344771bbbc44fd37eee772c5c3b44d6.zip
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>
Diffstat (limited to 'docs/Makefile')
-rw-r--r--docs/Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/Makefile b/docs/Makefile
index e5f8d9c6e0..78de2d396f 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -24,6 +24,7 @@ build: $(THEME)
.PHONY: update
update: $(THEME)
-$(THEME):
- mkdir -p $@
- curl -s $(ARCHIVE) | tar xz -C $@
+$(THEME): $(THEME)/theme.toml
+$(THEME)/theme.toml:
+ mkdir -p $$(dirname $@)
+ curl -s $(ARCHIVE) | tar xz -C $$(dirname $@)