-
Notifications
You must be signed in to change notification settings - Fork 1
/
simple.sim
55 lines (45 loc) · 1.58 KB
/
simple.sim
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
call "./akosile/akomisc.sim"
call "./akosile/preparedir.sim"
call simple.io.Directory
block main()
dir = null
p = new Directory("templates/") templateFolder = p.absolutePath()
cmdparamsLen = lengthOf(cmdparams)
for a = 0 to cmdparamsLen {
switch cmdparams[a] {
case "--help" helpMessage() continue
case "-h" helpMessage() continue
case "--h" helpMessage() continue
case "--about" aboutAkosile() continue
case "-a" aboutAkosile() continue
case "--a" aboutAkosile() continue
case "--verbose" printVerbose = true continue
case "-v" printVerbose = true continue
case "--v" printVerbose = true continue
case "--docasindex" dotDocAsIndex = true continue
case "-i" dotDocAsIndex = true continue
case "--i" dotDocAsIndex = true continue
case "--indexes" generateIndexes = false continue
case "-n" generateIndexes = false continue
case "--n" generateIndexes = false continue
case "--silent" akoBeSilent = true continue
case "-s" akoBeSilent = true continue
case "--s" akoBeSilent = true continue
case "--destination" akoDestDir = cmdparams[a++]
case "-ds" akoDestDir = cmdparams[a++]
case "--ds" akoDestDir = cmdparams[a++]
case "--directory" dir = cmdparams[a++]
case "-d" dir = cmdparams[a++]
case "--d" dir = cmdparams[a++]
case "--map" akoMapFile = cmdparams[a++]
case "-m" akoMapFile = cmdparams[a++]
case "--m" akoMapFile = cmdparams[a++]
default
# path = new Directory(cmdparams[a])
# if path.isADirectory() {
# dir = cmdparams[a]
# continue
# }
}
}
prepareDirectory(dir)