-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (24 loc) · 826 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
dirs:
@find . -type d -name 0\* -not -path '*/\.*' | sort
links:
@for dir in $$(find . -type d -name ch\* | sort); do \
cd "$$dir" && \
for i in $$(find . ! -path ./README.md -type f -name README.md | sort); do \
echo "- [$$(head -1 "$$i" | sed -e 's/# //')]($$i)"; \
done; \
cd - >/dev/null; \
done
next:
@for dir in $$(find . -type d -name ch\* | sort); do \
cd "$$dir" && \
for i in $$(find . ! -path ./README.md -type f -name README.md | sort); do \
echo "[Next: $$(head -1 "$$i" | sed -e 's/# //')](.$$i)"; \
done; \
cd - >/dev/null; \
done
edit:
@vim $$(find . -type f -name README.md | sort)
spell:
-find . -type f -name "*.md" -exec aspell check {} \;
clean:
-find . -type f -name \*.bak -exec rm {} \; -print