forked from shekkbuilder/ctf.tf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_links.sh
64 lines (58 loc) · 1.54 KB
/
create_links.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
#TOOL="ln -s"
TOOL="cp"
function linkrange {
COUNTER=$2
while [ $COUNTER -le $3 ]; do
$TOOL $1.html $COUNTER.html &> /dev/null
let COUNTER=COUNTER+1
done
}
# paginate sites
paginate=(_browse _latest _easy _medium _hard)
for item in ${paginate[*]}
do
echo "LINKING $item..."
cd $item
linkrange 1 2 10
cd ..
done
echo "Creating _index"
# index
cd _index
$TOOL 0.html 1.html &> /dev/null
$TOOL 0.html 2.html &> /dev/null
$TOOL 0.html 3.html &> /dev/null
$TOOL 0.html 4.html &> /dev/null
$TOOL 0.html 5.html &> /dev/null
$TOOL 0.html 6.html &> /dev/null
$TOOL 0.html 7.html &> /dev/null
$TOOL 0.html 8.html &> /dev/null
$TOOL 0.html 9.html &> /dev/null
$TOOL 0.html a.html &> /dev/null
$TOOL 0.html b.html &> /dev/null
$TOOL 0.html c.html &> /dev/null
$TOOL 0.html d.html &> /dev/null
$TOOL 0.html e.html &> /dev/null
$TOOL 0.html f.html &> /dev/null
$TOOL 0.html g.html &> /dev/null
$TOOL 0.html h.html &> /dev/null
$TOOL 0.html i.html &> /dev/null
$TOOL 0.html j.html &> /dev/null
$TOOL 0.html k.html &> /dev/null
$TOOL 0.html l.html &> /dev/null
$TOOL 0.html m.html &> /dev/null
$TOOL 0.html n.html &> /dev/null
$TOOL 0.html o.html &> /dev/null
$TOOL 0.html p.html &> /dev/null
$TOOL 0.html q.html &> /dev/null
$TOOL 0.html r.html &> /dev/null
$TOOL 0.html s.html &> /dev/null
$TOOL 0.html t.html &> /dev/null
$TOOL 0.html u.html &> /dev/null
$TOOL 0.html v.html &> /dev/null
$TOOL 0.html w.html &> /dev/null
$TOOL 0.html x.html &> /dev/null
$TOOL 0.html y.html &> /dev/null
$TOOL 0.html z.html &> /dev/null
cd ..