Skip to content

Commit 915e764

Browse files
committed
build: add download-docs target
This target re-downloads the manpages from systemd's repo
1 parent b314a79 commit 915e764

2 files changed

Lines changed: 25 additions & 7 deletions

File tree

.gitignore

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
man/*.5
2-
man/*.8
3-
man/*.html
4-
bin/sysusers
5-
bin/opensysusers
6-
openrc/opensysusers.initd
1+
/man/*.1
2+
/man/*.5
3+
/man/*.8
4+
/man/*.html
5+
/bin/sysusers
6+
/bin/opensysusers
7+
/openrc/opensysusers.initd

man/Makefile

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,23 @@ doc:
2424
xsltproc $(xsltargs) -o systemd-sysusers.html custom-html.xsl systemd-sysusers.xml
2525
xsltproc $(xsltargs) -o sysusers.d.html custom-html.xsl sysusers.d.xml
2626

27+
# Delete files because wget can't overwrite them
28+
download-docs:
29+
rm -f *.xml *.xsl
30+
if command -v wget; then \
31+
download='wget'; \
32+
elif command -v curl; then \
33+
download='curl --location --remote-name-all'; \
34+
elif command -v fetch; then \
35+
download='fetch'; \
36+
fi; \
37+
$$download \
38+
'https://github.com/systemd/systemd/raw/main/man/custom-html.xsl' \
39+
'https://github.com/systemd/systemd/raw/main/man/custom-man.xsl' \
40+
'https://github.com/systemd/systemd/raw/main/man/standard-options.xml' \
41+
'https://github.com/systemd/systemd/raw/main/man/systemd-sysusers.xml' \
42+
'https://github.com/systemd/systemd/raw/main/man/sysusers.d.xml'
43+
2744
clean:
2845
rm -f $(manfiles5)
2946
rm -f $(manfiles8)
@@ -56,4 +73,4 @@ ifeq ($(HAVEDOC),yes)
5673
uninstall: uninstall-doc
5774
endif
5875

59-
.PHONY: all install install-man install-doc clean
76+
.PHONY: all man doc download-docs clean install install-man install-doc uninstall-man uninstall-doc uninstall

0 commit comments

Comments
 (0)