Skip to content

Commit cfd3e33

Browse files
committed
sort dir names | generate README.md
1 parent 146212f commit cfd3e33

File tree

4 files changed

+33
-11
lines changed

4 files changed

+33
-11
lines changed

Makefile

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1-
DIRS= rpi \
2-
linux
1+
DIRS_UNSORTED= rpi \
2+
linux \
3+
brave_browser
4+
5+
DIRS=$(sort $(DIRS_UNSORTED))
6+
7+
## print sorted DIRS
8+
#$(info $$(DIRS) is [${DIRS}])
39

410
include vars.mk
511

612
LOWDOWN_PATH=./lowdown
713
CSS_PATH=style.css
8-
OBJS= build.sh style.css style.css.map index.html
14+
OBJS= build.sh README.md style.css style.css.map index.html
915

10-
build: clean script index.html fix_index.html
16+
build: clean script README index.html fix_index.html
1117
@echo -e "$(COLOR_GREEN)DONE$(COLOR_NONE)"
1218

1319
clean:
@@ -23,6 +29,19 @@ script:
2329
@chmod +x build.sh
2430
@./build.sh
2531

32+
README:
33+
@echo -e "$(COLOR_YELLOW)Generating$(COLOR_NONE) README file $(COLOR_BLUE)README.md$(COLOR_NONE)"
34+
@echo '# devpogi notes' > README.md
35+
@echo >> README.md
36+
@echo '*My learnings on various subjects.*' >> README.md
37+
@echo >> README.md
38+
@echo 'List' >> README.md
39+
@echo >> README.md
40+
@for dirname in $(DIRS); do \
41+
echo "- [$${dirname}]($${dirname}/$${dirname}_notes.md)" >> README.md ; \
42+
done
43+
@echo >> README.md
44+
2645
index.html: README.md style.css
2746
@$(LOWDOWN_PATH) $< -o $@.temp -thtml
2847
@cat html_envelope > index.html

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
*My learnings on various subjects.*
44

5-
## List
5+
List
66

7-
- [Raspberry Pi](rpi/rpi_notes.md)
8-
- [Linux](linux/linux_notes.md)
7+
- [brave_browser](brave_browser/brave_browser_notes.md)
8+
- [linux](linux/linux_notes.md)
9+
- [rpi](rpi/rpi_notes.md)
910

build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# AUTOGENERATED!! DO NOT EDIT
2-
make -C rpi -f rpi.mk --no-print-directory
2+
make -C brave_browser -f brave_browser.mk --no-print-directory
33
make -C linux -f linux.mk --no-print-directory
4+
make -C rpi -f rpi.mk --no-print-directory

index.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ <h1 id="devpogi-notes">devpogi notes</h1>
2424

2525
<p><em>My learnings on various subjects.</em></p>
2626

27-
<h2 id="list">List</h2>
27+
<p>List</p>
2828

2929
<ul>
30-
<li><a href="rpi/rpi_notes.html">Raspberry Pi</a></li>
31-
<li><a href="linux/linux_notes.html">Linux</a></li>
30+
<li><a href="brave_browser/brave_browser_notes.html">brave_browser</a></li>
31+
<li><a href="linux/linux_notes.html">linux</a></li>
32+
<li><a href="rpi/rpi_notes.html">rpi</a></li>
3233
</ul>
3334
</body>
3435
</html>

0 commit comments

Comments
 (0)