-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.shsh
More file actions
74 lines (64 loc) · 1.54 KB
/
.shsh
File metadata and controls
74 lines (64 loc) · 1.54 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash
# REV09: Mon 02 Oct 2023 13:00
# REV08: Sun 01 Oct 2023 08:00
# REV07: Tue 12 Oct 2021 11:00
# REV05: Wed 02 Jun 2021 09:00
# REV03: Thu 22 Oct 2020 08:00
# START: Tue 25 Dec 2018 10:00
# Copyright (C) 2018-2023 Abdul Latip.
# This program is free script/software. This program is distributed in the hope
# that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
function mkidx {
cd $1
###### ############################## YEAR
printf -- '---\nlayout: "layout"\n---\n# 2024\n' > index.md
for II in $(ls) ; do
[ "$II" == "index.md" ] && continue
[ -f $II ] && echo "* [$II]($II)" >> index.md
[ -d $II ] && echo "* [$II]($II/)" >> index.md
[ -d $II ] && $(mkidx $II)
done
cd ..
}
README="00-README-ls-alR"
cat > ${README}.md << EOF
---
layout: "layout"
---
<br>
# 2024
\`\`\`
EOF
ls -R >> ${README}.md
cat >> ${README}.md << EOF
\`\`\`
EOF
for II in \
${README}.md \
45UUD \
IDX \
INPRES \
KEPDIRJEN \
KEPMEN \
KEPMENKO \
KEPSESMENKO \
KEPPRES \
MK \
MPR \
PERPRES \
PERDA \
PERKA \
PERMEN \
PERMENKO \
PERPU \
PNPS \
PP \
SKB \
UI \
UU \
; do
[[ "$II" == "${README}.md" ]] || mkdir -pv $II/
[ -d $II ] && mkidx $II
done
exit 0