aboutsummaryrefslogtreecommitdiff
path: root/lib/tools.nim
blob: 82cafff42c421613bdd77a8da35b0e236227cb63 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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