depsterr.com

The sources and build system for depsterr.com
git clone git://depsterr.com/git/depsterr.com
Log | Files | Refs | LICENSE

commit 4ce5ef6bcfe512a82199af90856133d68c45abda
parent 33daba2e026c3e9c482a7f71cd59d1397911833d
Author: depsterr <depsterr@protonmail.com>
Date:   Fri, 26 Jun 2020 03:47:20 +0200

added .. listing for directories whose parent directory is not DESTDIR

Diffstat:
Mmake_pages.sh | 10+++++++++-
Msrc/about.md | 2+-
2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/make_pages.sh b/make_pages.sh @@ -18,6 +18,12 @@ dirname() { printf '%s\n' "${dir:-/}" } +cmpdirs() { + d1="$(cd "$1" && pwd -P)" + d2="$(cd "$2" && pwd -P)" + [ "$d1" = "$d2" ] && return 0 || return 1 +} + cd "$(dirname "$0")" || exit DESTDIR=doc @@ -54,6 +60,7 @@ done # generate sub pages find "$SRCDIR" -type d -not -name "$SRCDIR" -and -not -path "*/git/*" | while read -r dir; do inner="" + cmpdirs "$dir/.." "$SRCDIR" || inner="${inner}<li><a href=\"..\">..</a></li>" for cdir in "$dir"/*/; do [ -d "$cdir" ] || continue cdir="$(basename "$cdir")/" @@ -61,7 +68,7 @@ find "$SRCDIR" -type d -not -name "$SRCDIR" -and -not -path "*/git/*" | while re done for file in "$dir"/*.md; do [ -f "$file" ] || continue - echo $file | grep -q "index.md" && continue + echo "$file" | grep -q "index.md" && continue file="$(basename "${file%.md}.html")" inner="${inner}<li><a href=\"$file\">${file%.html}</a></li>" done @@ -79,6 +86,7 @@ done find "$DESTDIR" -type d -not -name "$SRCDIR" -and -not -path "*/git*" | while read -r dir; do [ -f "$dir/index.html" ] && continue inner="" + cmpdirs "$dir/.." "$SRCDIR" || inner="${inner}<li><a href=\"..\">..</a></li>" for cdir in "$dir"/*/; do [ -d "$cdir" ] || continue cdir="$(basename "$cdir")/" diff --git a/src/about.md b/src/about.md @@ -12,7 +12,7 @@ Not very much. I post about programming and other geek related stuff on the [blo This site was running on [srws](https://github.com/depsterr/srws), my own web server. However it is currently running on [quark](https://tools.suckless.org/quark/). The server computer itself is a self hosted machine running OpenBSD. -The source for the site is made up of markdown and is built using a script I wrote. You can find the source of this site (and the build scripts) under the [depsterr.com git repo](/git/depsterr.com/files.html). +The source for the site is made up of markdown files that are converted into html using [smu](https://github.com/Gottox/smu)and a shell script I wrote. You can find the source for this site (as well as the build scripts) in the [depsterr.com git repo](/git/depsterr.com/files.html). The git repos are generated using and post-update git hooks [stagit](https://git.codemadness.org/stagit/file/README.html).