-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
index.sh
executable file
·40 lines (32 loc) · 928 Bytes
/
index.sh
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
#!/usr/bin/env bash
#########################
# archibold.io (C) 2016 #
#########################
if [ "$DIR" = "" ]; then
exit 1
fi
echo "#!/usr/bin/env bash
####################
# (C) archibold.io #
####################
# <script>document.documentElement.style.opacity=0</script>
# <link rel='styleSheet' href='/css/markdown.css'/>
# <script defer src='//cdn.rawgit.com/showdownjs/showdown/1.5.1/dist/showdown.min.js'></script>
# <script defer src='/js/transformer.js'></script><pre>
####################
source <(curl -s https://archibold.io/require)
require echomd
clear
" > $DIR/index.html
echo 'echomd "' >> $DIR/index.html
echo "# archibold.io/$DIR" >> $DIR/index.html
for f in $(ls $DIR); do
if [ "$f" != "index.html" ]; then
if [ -f info/$f ]; then
echo "**$f**" >> $DIR/index.html
cat info/$f >> $DIR/index.html
echo '' >> $DIR/index.html
fi
fi
done
echo '"' >> $DIR/index.html