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