From 149b450b4102f258cdc928fd83a28fdf9e9d1665 Mon Sep 17 00:00:00 2001 From: thematdev Date: Thu, 21 Sep 2023 22:34:53 +0300 Subject: [PATCH] Dummy automatic index for mipt_cxx --- pages/mipt_cxx1/Makefile | 4 ++-- pages/mipt_cxx1/generate_index.sh | 18 ++++++++++++++++++ pages/mipt_cxx1/index.html | 0 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100755 pages/mipt_cxx1/generate_index.sh delete mode 100644 pages/mipt_cxx1/index.html diff --git a/pages/mipt_cxx1/Makefile b/pages/mipt_cxx1/Makefile index 646cbbd..9440b84 100644 --- a/pages/mipt_cxx1/Makefile +++ b/pages/mipt_cxx1/Makefile @@ -13,9 +13,9 @@ $(PREFIX)/%.html: %.md @mkdir -p $(@D) pandoc $< --to html --output $@ --standalone -$(PREFIX)/index.html: index.html +$(PREFIX)/index.html: @mkdir -p $(@D) - cp $< $@ + ./generate_index.sh > $@ index: $(PREFIX)/index.html diff --git a/pages/mipt_cxx1/generate_index.sh b/pages/mipt_cxx1/generate_index.sh new file mode 100755 index 0000000..927ba29 --- /dev/null +++ b/pages/mipt_cxx1/generate_index.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +cat <<-_EOF + + +Конспекты по плюсам + + +_EOF + +for page in *.md; do + p=${page%.md} + echo "$p" +done + +cat <<-_EOF + + +_EOF diff --git a/pages/mipt_cxx1/index.html b/pages/mipt_cxx1/index.html deleted file mode 100644 index e69de29..0000000