X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=searchindex.sh;h=162fad12e72109af68e6ad3365142112202affb6;hb=536808b3cbfbe1cf1272d645faec3a32c310d24f;hp=029f0f4630b108939355c6d5b37434569904fd94;hpb=08e02da11207d97b7c7d4db58619cdb0a59476e2;p=shellwiki diff --git a/searchindex.sh b/searchindex.sh index 029f0f4..162fad1 100755 --- a/searchindex.sh +++ b/searchindex.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2023 Paul Hänsch +# Copyright 2023, 2024 Paul Hänsch # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -135,7 +135,7 @@ prune() { } index() { - export PATH_INFO="" _DATE="$(date +%s)" + export PATH_INFO="" _DATE="$(date +%s)" SEARCH_INDEX=true if [ "$location" ]; then location="${location#/}" location="${location%/}" @@ -152,6 +152,7 @@ index() { then [ "$verb" ] && printf "%${v}s\r%s\r" "" "$PATH_INFO" >&2 v="${#PATH_INFO}" + cd -- "$_DATA/pages/$PATH_INFO" "$_EXEC/parsers/40_indexer.sh" <"$_DATA/pages/$PATH_INFO/#page.md" >/dev/null fi done