diff options
author | Rémy Oudompheng <remy@archlinux.org> | 2011-06-19 21:01:55 +0200 |
---|---|---|
committer | Rémy Oudompheng <remy@archlinux.org> | 2011-06-19 21:01:55 +0200 |
commit | 43926c44661a9f8499b3fb9775e1cfdd4aef2bdf (patch) | |
tree | c8a01d6692bd8132971db7e4cbc12689856cdb71 | |
parent | c45d8ae987272cc64ec84d00de44f16c69e03034 (diff) | |
download | netctl-43926c44661a9f8499b3fb9775e1cfdd4aef2bdf.tar.gz netctl-43926c44661a9f8499b3fb9775e1cfdd4aef2bdf.tar.xz |
Allow using markdown instead of pandoc, packaging fixes
Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
-rw-r--r-- | Makefile | 9 | ||||
-rw-r--r-- | README | 4 | ||||
-rwxr-xr-x | docs/make.sh | 14 | ||||
-rwxr-xr-x | scripts/netcfg | 2 |
4 files changed, 21 insertions, 8 deletions
@@ -1,5 +1,5 @@ DESTDIR= -VERSION=2.6 +VERSION=2.6rc1 VPATH = doc .PHONY: install docs @@ -45,13 +45,12 @@ install-docs: docs install -m644 contrib/* $(DESTDIR)/usr/share/doc/netcfg/contrib/ docs: - cd docs; \ - ./make.sh + cd docs && ./make.sh tarball: docs - sed -i "s/NETCFG_VER=.*/NETCFG_VER=$(VERSION)/g" src/netcfg + sed -i "s/NETCFG_VER=.*/NETCFG_VER=$(VERSION)/g" scripts/netcfg mkdir -p netcfg-$(VERSION) - cp -r src src-wireless ifplugd wpa_actiond examples contrib man Makefile LICENSE README netcfg-$(VERSION) + cp -r src scripts src-wireless ifplugd wpa_actiond examples contrib man Makefile LICENSE README netcfg-$(VERSION) tar -zcvf netcfg-$(VERSION).tar.gz netcfg-$(VERSION) rm -rf netcfg-$(VERSION) @@ -17,3 +17,7 @@ For wireless support: Deprecated dependencies: - net-tools (only used in IFOPTS option) - wireless_tools (only used for IWCONFIG option, still necessary for wireless connection) + +For documentation generation: +- python-markdown, or pandoc + diff --git a/docs/make.sh b/docs/make.sh index 544d1f3..76a30af 100755 --- a/docs/make.sh +++ b/docs/make.sh @@ -1,7 +1,17 @@ #! /bin/bash PAGES=(ethernet features wireless) +make_page() { + echo '<html><body>' + grep -v '^%' $1 | markdown -x def_list -x headerid /dev/stdin + echo '</body></html>' +} + for page in ${PAGES[@]}; do - rm ${page}.html - pandoc -s --toc -w html --email-obfuscation=javascript -c header.css -o ${page}.html $page + rm -f ${page}.html + if [ -f /usr/bin/pandoc ]; then + pandoc -s --toc -w html --email-obfuscation=javascript -c header.css -o ${page}.html $page + else + make_page $page > ${page}.html + fi done diff --git a/scripts/netcfg b/scripts/netcfg index e00794d..7b8fa8a 100755 --- a/scripts/netcfg +++ b/scripts/netcfg @@ -2,7 +2,7 @@ . /usr/lib/network/network -NETCFG_VER=2.6 +NETCFG_VER=2.6rc1 version() { |