From ad71825bc02739ef71bcccef243692d81ae3fefd Mon Sep 17 00:00:00 2001 From: parazyd Date: Fri, 14 Oct 2016 02:32:15 +0200 Subject: [PATCH 1/8] begin adding documentation --- doc/Makefile | 18 ++++ doc/libdevuansdk.7.md | 48 ++++++++++ doc/nanodoc | 71 +++++++++++++++ doc/static/foot.html | 11 +++ doc/static/head.html | 199 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 347 insertions(+) create mode 100644 doc/Makefile create mode 100644 doc/libdevuansdk.7.md create mode 100755 doc/nanodoc create mode 100644 doc/static/foot.html create mode 100644 doc/static/head.html diff --git a/doc/Makefile b/doc/Makefile new file mode 100644 index 0000000..67e972d --- /dev/null +++ b/doc/Makefile @@ -0,0 +1,18 @@ +all: clean html man + +html: + @echo generating html... + @./nanodoc html + +man: + @echo generating manpages... + @./nanodoc man + +clean: + @echo cleaning... + @rm -rf html man nav.html + @sed -i -e 's:index.html">.*:html">NAME:' static/head.html + @sed -i -e 's:Subtitle">.*:Subtitle">DESC:' static/head.html + @sed -i -e 's:libdevuansdk-.*:libdevuansdk-VERSION:' static/foot.html + +.PHONY: all html man clean diff --git a/doc/libdevuansdk.7.md b/doc/libdevuansdk.7.md new file mode 100644 index 0000000..416b5f0 --- /dev/null +++ b/doc/libdevuansdk.7.md @@ -0,0 +1,48 @@ +index +===== + +`libdevuansdk` is a shell script library intended to unify the use and creation +of various functions spread throughout devuan's various sdks. + +devuan's sdks are designed to be used interactively from a terminal, as +well as from shell scripts. libdevuansdk uses the functionality of the +[zuper](https://github.com/dyne/zuper) zsh library, but it does not include +it. you are required to include it in your sdk. however, `libdevuansdk` +requires the following packages to be installed: + +``` +zsh debootstrap sudo kpartx cgpt xz-utils +``` + +## notes + +to support the development, you are welcome to open issues on problems and +bugs you encounter. open merge requests of patches or simply get involved +in other tasks evident on + +## acknowledgments + +Devuan's SDK was originally conceived during a period of residency at the +Schumacher college in Dartington, UK. Greatly inspired by the laborious and +mindful atmosphere of its wonderful premises. + +The Devuan SDK is Copyright (c) 2015-2016 by the Dyne.org Foundation + +Devuan SDK components are designed, written and maintained by: + +- Ivan J. +- Denis Roio +- Enzo Nicosia + +This source code is free software: you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the Free +Software Foundation, either version 3 of the License, or (at your option) +any later version. + +This software is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +more details. + +You should have received a copy of the GNU General Public License along +with this source code. If not, see . diff --git a/doc/nanodoc b/doc/nanodoc new file mode 100755 index 0000000..d41f572 --- /dev/null +++ b/doc/nanodoc @@ -0,0 +1,71 @@ +#!/bin/sh +# Copyright (c) 2016 parazyd +# nanodoc is written and maintained by parazyd +# +# This file is part of arm-sdk +# +# This source code is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This software is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this source code. If not, see . + +org="parazyd | dyne.org" +name=libdevuansdk +version=2.0 +desc="common.lib.for.devuan.sdks" + +pages=" + libdevuansdk.7" + + +generate_manpages() { + for page in $pages; do + ronn -r --manual=$name --organization="$org" ${page}.md + done + + mkdir -p man/7 + mv *.7 man/7 +} + +generate_html() { + mkdir -p html + sed -i -e 's/NAME/'$name'/' -e 's/DESC/'$desc'/g' static/head.html + sed -i -e 's/VERSION/'$version'/' static/foot.html + + for page in $pages; do + pagetitle=$(sed 1q ${page}.md) + printf '
  • %s
  • \n' $page $pagetitle >> nav.html + done + + printf "
    \n" >> nav.html + + for page in $pages; do + printf "\thtml/%s\n" ${page} + cat static/head.html > html/${page}.html + cat nav.html >> html/${page}.html + python -m markdown ${page}.md >> html/${page}.html + cat static/foot.html >> html/${page}.html + + pagetitle=$(sed 1q ${page}.md) + sed -i -e 's/TITLE/'$pagetitle'/' html/${page}.html + sed -i -e 's/'$page'.html" class="notPage/'$page'.html" class="thisPage/' html/${page}.html + done + + ln -sf libdevuansdk.7.html html/index.html + #cat nav.html + rm -f nav.html +} + +case $1 in + man) generate_manpages && exit 0 ;; + html) generate_html && exit 0 ;; + *) exit 1 ;; +esac diff --git a/doc/static/foot.html b/doc/static/foot.html new file mode 100644 index 0000000..f8b3678 --- /dev/null +++ b/doc/static/foot.html @@ -0,0 +1,11 @@ + +
    + + + + + diff --git a/doc/static/head.html b/doc/static/head.html new file mode 100644 index 0000000..ce9fc29 --- /dev/null +++ b/doc/static/head.html @@ -0,0 +1,199 @@ + + + + + TITLE + + + + + + + +
    +
    \n" >> nav.html for page in $pages; do - printf "\thtml/%s\n" ${page} + printf "\thtml/%s\n" $page cat static/head.html > html/${page}.html cat nav.html >> html/${page}.html python -m markdown ${page}.md >> html/${page}.html cat static/foot.html >> html/${page}.html pagetitle=$(sed 1q ${page}.md) - sed -i -e 's/TITLE/'$pagetitle'/' html/${page}.html + sed -i -e 's/TITLE/'"$pagetitle"'/' html/${page}.html sed -i -e 's/'$page'.html" class="notPage/'$page'.html" class="thisPage/' html/${page}.html done From 97ded7552ae599e9c4fd15d75d97aa4e20868841 Mon Sep 17 00:00:00 2001 From: parazyd Date: Fri, 14 Oct 2016 09:57:50 +0200 Subject: [PATCH 6/8] add workflow stub --- doc/nanodoc | 9 +++++---- doc/workflow.7.md | 4 ++++ 2 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 doc/workflow.7.md diff --git a/doc/nanodoc b/doc/nanodoc index bac2b67..dcb2cf2 100755 --- a/doc/nanodoc +++ b/doc/nanodoc @@ -19,15 +19,16 @@ org="parazyd | dyne.org" name=libdevuansdk -version=2.0 -desc="common library for devuan's sdk" +version=0.2 +desc="common library for devuan's sdks" pages=" libdevuansdk.7 configuration.7 + workflow.7 helper_functions.7 - creating_wrappers.7" - + creating_wrappers.7 +" generate_manpages() { for page in $pages; do diff --git a/doc/workflow.7.md b/doc/workflow.7.md new file mode 100644 index 0000000..80cfc6b --- /dev/null +++ b/doc/workflow.7.md @@ -0,0 +1,4 @@ +libdevuansdk workflow +===================== + + From b18b590b2cf9cc1d41bae798a36bcc29a07808f8 Mon Sep 17 00:00:00 2001 From: parazyd Date: Sat, 15 Oct 2016 10:36:37 +0200 Subject: [PATCH 7/8] fix typo in creating_wrappers(7) --- doc/creating_wrappers.7.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/creating_wrappers.7.md b/doc/creating_wrappers.7.md index 64004ba..76a3da3 100644 --- a/doc/creating_wrappers.7.md +++ b/doc/creating_wrappers.7.md @@ -47,7 +47,7 @@ the [zuper](https://github.com/dyne/zuper) zsh library. just to be safe. * `$size` - This variable will hold the value in MB for `dd` to know how many zeroes it + This variable will hold the value in MiB for `dd` to know how many zeroes it should put in the raw image. ex: `size=1337` From eef09941ede7e778c57b37ebbf17dd8199be7dcc Mon Sep 17 00:00:00 2001 From: parazyd Date: Tue, 18 Oct 2016 13:53:59 +0200 Subject: [PATCH 8/8] document workflow --- doc/workflow.7.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/doc/workflow.7.md b/doc/workflow.7.md index 80cfc6b..569df8c 100644 --- a/doc/workflow.7.md +++ b/doc/workflow.7.md @@ -1,4 +1,32 @@ libdevuansdk workflow ===================== +Working with libdevuansdk splits into categories of what you want to do. +`zlibs` are files separated into these "categories": +## bootstrap + +Contains the functions for the bootstrap process. Creating a minimal debootstrap +base, and making it into a tarball for later use so you don't have to wait for +the debootstrap on every build. + +## helpers + +Contains the helper functions for libdevuansdk that make your and my life a bit +easier. + +## imaging + +Contains the functions necessary for creating raw dd-able images. + +## kernel + +Contains the functions for installing a vanilla kernel. + +## rsync + +Contains rsync functions + +## sysconf + +Contains the default system configuration.