summaryrefslogtreecommitdiff
path: root/www/generate/src/stagit-breadcrumb
diff options
context:
space:
mode:
authorHayden Hamilton <hayden@hhvn.uk>2026-09-14 19:59:11 +0100
committerHayden Hamilton <hayden@hhvn.uk>2026-09-14 19:59:11 +0100
commit06adabffe759eafcd3932e98b0395dcbd95bc16c (patch)
treefee8edf0150b049849f870b08495b26045dea272 /www/generate/src/stagit-breadcrumb
parentda348e3d7b56df2bf5bb243405d7a44eda893c79 (diff)
Switched to cgit -> remove stagit scripts
Diffstat (limited to 'www/generate/src/stagit-breadcrumb')
-rwxr-xr-xwww/generate/src/stagit-breadcrumb42
1 files changed, 0 insertions, 42 deletions
diff --git a/www/generate/src/stagit-breadcrumb b/www/generate/src/stagit-breadcrumb
deleted file mode 100755
index 8dabc2d..0000000
--- a/www/generate/src/stagit-breadcrumb
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/rc
-#
-# This script is very slow.
-# Hence the option to use find's -newer.
-# A file can be created before stagit runs,
-# and this script will only modify files created after.
-#
-# stagit will not modify files in the commit/ dir once created
-# It does however recreate everything at HEAD.
-# This isn't ideal.
-#
-# Most of the time taken in this script is most likely NOT cpu time.
-# It may be a good idea to run the main loop portion of this script in parallel.
-
-wwwdir = /var/www/htdocs/src.hhvn.uk
-newer = $1
-cd $wwwdir
-
-if (!~ $newer ()) {
- fargs = (-newer $1)
-}
-
-fn breadcrumb {
- printf %s '<h1>'
- www/generate/breadcrumb $* | sed 's~&~\\\\\&~g'
- printf %s '</h1>'
-}
-
-files = `$nl{find . $fargs -type f -name '*.html'}
-estatus = 0
-for (f in $files) {
- printf %s 'BREADCRUMB ' ^ $f ^ '... '
- breadcrumb = `''{breadcrumb $f hhvn.uk src}
- awk -v breadcrumb=$breadcrumb '{ sub(/<h1>.*<\/h1>/, breadcrumb); sub(/<span class="desc">Repositories<\/span>/, breadcrumb) }1' < $f > $f.awk
- if (~ $status 0) {
- echo success
- mv $f.awk $f
- } else {
- rm $f.awk
- estatus = $status
- }
-}