diff options
| author | Joey Yakimowich-Payne <jyapayne@gmail.com> | 2018-06-16 15:22:16 +0900 |
|---|---|---|
| committer | Joey Yakimowich-Payne <jyapayne@gmail.com> | 2018-06-16 15:22:16 +0900 |
| commit | 71699332be05b7a5aed93c4d9d80c4333f7692c3 (patch) | |
| tree | cbb862fb4c6b190ef5e9c8c6d388a8446e28dfa7 | |
| parent | a8bcbf8e89460a460cfed6842b10eedcda9f50b2 (diff) | |
| download | nimgen-71699332be05b7a5aed93c4d9d80c4333f7692c3.tar.gz nimgen-71699332be05b7a5aed93c4d9d80c4333f7692c3.zip | |
Allow for deeper than one directory paths
| -rw-r--r-- | nimgen.nim | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -4,6 +4,7 @@ var gDoneRecursive: seq[string] = @[] gDoneInline: seq[string] = @[] + gProjectDir = getCurrentDir() gConfig: Config gFilter = "" gQuotes = true @@ -59,7 +60,7 @@ proc extractZip(zipfile: string) = cmd = "powershell -nologo -noprofile -command \"& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('$#', '.'); }\"" setCurrentDir(gOutput) - defer: setCurrentDir("..") + defer: setCurrentDir(gProjectDir) echo "Extracting " & zipfile discard execProc(cmd % zipfile) @@ -84,7 +85,7 @@ proc gitReset() = echo "Resetting Git repo" setCurrentDir(gOutput) - defer: setCurrentDir("..") + defer: setCurrentDir(gProjectDir) discard execProc("git reset --hard HEAD") @@ -95,7 +96,7 @@ proc gitRemotePull(url: string, pull=true) = return setCurrentDir(gOutput) - defer: setCurrentDir("..") + defer: setCurrentDir(gProjectDir) echo "Setting up Git repo" discard execProc("git init .") @@ -112,7 +113,7 @@ proc gitSparseCheckout(plist: string) = return setCurrentDir(gOutput) - defer: setCurrentDir("..") + defer: setCurrentDir(gProjectDir) discard execProc("git config core.sparsecheckout true") writeFile(sparsefile, plist) |
