summary refs log blame commit diff stats
path: root/install_nimble.nims
blob: 5d028726be518f6784b3236da5b507fb79a78492 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
 

              










                                                                    



                                                          
                                                               
import ospaths

mode = ScriptMode.Verbose

var id = 0
while dirExists("nimble" & $id):
  inc id

exec "git clone https://github.com/nim-lang/nimble.git nimble" & $id

withDir "nimble" & $id & "/src":
  exec "nim c nimble"

mkDir "bin/nimblepkg"
for file in listFiles("nimble" & $id & "/src/nimblepkg/"):
  cpFile file, "bin/nimblepkg/" & file.extractFilename

mvFile "nimble" & $id & "/src/nimble".toExe, "bin/nimble".toExe