diff options
Diffstat (limited to 'lib/tools.nim')
-rw-r--r-- | lib/tools.nim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/tools.nim b/lib/tools.nim new file mode 100644 index 0000000..82cafff --- /dev/null +++ b/lib/tools.nim @@ -0,0 +1,19 @@ +import os, ospaths +import bisect, install + +let fileName = paramStr(0).splitFile().name +let appName = getAppFilename().splitFile().name + +let paramsFull = commandLineParams() +let (tool, params) = if fileName == appName: + (paramsFull[0], paramsFull[1 .. ^1]) + else: + (fileName, paramsFull) + +programResult = case tool: + of "bisect": + handleBisect(params) + of "install": + handleInstall(params) + else: + 1
\ No newline at end of file |