summaryrefslogtreecommitdiff
path: root/bin/extra/notes_index
diff options
context:
space:
mode:
Diffstat (limited to 'bin/extra/notes_index')
-rwxr-xr-xbin/extra/notes_index4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/extra/notes_index b/bin/extra/notes_index
index 28942cb..05a2452 100755
--- a/bin/extra/notes_index
+++ b/bin/extra/notes_index
@@ -22,7 +22,7 @@ do
-printf '%f ' \
-exec grep '^# ' -m1 {} \; |
sed 's/\(.\+\.md\) # \(.\+\)/- [\2][\1]/' |
- sort -t '[' -k 2 -n >> index.md
+ sort -k 3 -n >> index.md
if [ "$(find . -mindepth 2 -maxdepth 2 -type f -name '*.md' | wc -l)" -gt 0 ]
then
@@ -33,7 +33,7 @@ do
-type d \
-not -name '.*'\
-printf '- [%f][%f/index.md]\n' |
- sort -t '[' -k 2 >> index.md
+ sort -k 3 >> index.md
fi
cd - > /dev/null