Last bits, etc.
This commit is contained in:
parent
d0d0c79540
commit
3321523ee4
1 changed files with 4 additions and 2 deletions
6
koch.nim
6
koch.nim
|
|
@ -90,10 +90,11 @@ proc update(args: string) =
|
||||||
|
|
||||||
var thisDir = getAppDir()
|
var thisDir = getAppDir()
|
||||||
var git = findExe("git")
|
var git = findExe("git")
|
||||||
echo("Checking for git repo...")
|
echo("Checking for git repo and git executable...")
|
||||||
if existsDir(thisDir & "/.git") and git != "":
|
if existsDir(thisDir & "/.git") and git != "":
|
||||||
echo("Git repo found!")
|
echo("Git repo found!")
|
||||||
# use git to download latest source
|
# use git to download latest source
|
||||||
|
echo("Checking for updates...")
|
||||||
discard startCmd(git & " fetch origin master")
|
discard startCmd(git & " fetch origin master")
|
||||||
var procs = startCmd(git & " diff origin/master master")
|
var procs = startCmd(git & " diff origin/master master")
|
||||||
var errcode = procs.waitForExit()
|
var errcode = procs.waitForExit()
|
||||||
|
|
@ -119,7 +120,7 @@ proc update(args: string) =
|
||||||
return
|
return
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
echo("No repo or executable found!")
|
||||||
when defined(haveZipLib):
|
when defined(haveZipLib):
|
||||||
echo("Falling back.. Downloading source code from repo...")
|
echo("Falling back.. Downloading source code from repo...")
|
||||||
# use dom96's httpclient to download zip
|
# use dom96's httpclient to download zip
|
||||||
|
|
@ -143,6 +144,7 @@ proc update(args: string) =
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# -------------- boot ---------------------------------------------------------
|
# -------------- boot ---------------------------------------------------------
|
||||||
|
|
||||||
const
|
const
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue