move tinyc to a separate repo and allow installing external dependencency (eg tinyc) from koch / library code (#13850)

* remove tinyc
* installDeps
* update tinyc paths
This commit is contained in:
Timothee Cour 2020-04-03 00:10:45 -07:00 • committed by GitHub
commit 93cd98dd14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
390 changed files with 80 additions and 99388 deletions

22
tools/deps.nim Normal file
View file

@ -0,0 +1,22 @@
import os, uri, strformat
proc exec(cmd: string) =
echo "deps.cmd: " & cmd
let status = execShellCmd(cmd)
doAssert status == 0, cmd
const commitHead* = "HEAD"
proc cloneDependency*(destDirBase: string, url: string, commit = commitHead, appendRepoName = true) =
let destDirBase = destDirBase.absolutePath
let p = url.parseUri.path
let name = p.splitFile.name
var destDir = destDirBase
if appendRepoName: destDir = destDir / name
let destDir2 = destDir.quoteShell
if not dirExists(destDir):
# note: old code used `destDir / .git` but that wouldn't prevent git clone
# from failing
exec fmt"git clone -q {url} {destDir2}"
exec fmt"git -C {destDir2} fetch -q"
exec fmt"git -C {destDir2} checkout -q {commit}"