From bbd17c625e80300563ad94ec4289209ac84fc68a Mon Sep 17 00:00:00 2001 From: Rob van Son Date: Wed, 31 Dec 2014 13:49:27 +0100 Subject: [PATCH] Reworked unzip command lines for Windows --- Config.praat | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Config.praat b/Config.praat index 3fc10ba..89d0450 100644 --- a/Config.praat +++ b/Config.praat @@ -1361,9 +1361,11 @@ endproc windowsUnzipCommand$ = "" if fileReadable("C:\Program Files\7-Zip\7z.exe") windowsUnzipCommand$ = """C:\Program Files\7-Zip\7z.exe"" e" + windowsUnzipDestDir$ = " -o" elsif fileReadable("C:\Program Files\WinZip\winzip32.exe") # !!! Find a way to include the output folder !!! windowsUnzipCommand$ = "C:\Program Files\WinZip\winzip32.exe"" -min -e " + windowsUnzipDestDir$ = "" endif procedure readWordlist .sourceDir$ .file$ # No use doing anything if the source does not exist @@ -1398,16 +1400,13 @@ procedure readWordlist .sourceDir$ .file$ createDirectory(.wordlistDirectory$) .wasWordList = 1 if macintosh or unix - system bash -rc -- 'cp "'.sourceDir$'/'.file$'" "'.wordlistDirectory$'/"' - system cd ''.wordlistDirectory$'';bash -rc -- 'unzip "'.file$'"' + system cd ''.wordlistDirectory$'';bash -rc -- 'unzip "'.file$'"' -d ''.wordlistDirectory$'' elsif windows and windowsUnzipCommand$ <> "" .winWordListDirectory$ = replace_regex$(.wordlistDirectory$, "/", "\\", 0) .winSourceDirectory$ = replace_regex$("'.sourceDir$'\'.file$'", "/", "\\", 0) - system copy "'.winSourceDirectory$'" "'.winWordListDirectory$'" /Y - system chdir /d "'.winWordListDirectory$'" && 'windowsUnzipCommand$' "'.file$'" + system mkdir "'.winWordListDirectory$'" & 'windowsUnzipCommand$' "'.winSourceDirectory$'" 'windowsUnzipDestDir$'"'.winWordListDirectory$'" endif endif - deleteFile("'.wordlistDirectory$'/'.file$'") # Remove if not valid! if fileReadable("'.wordlistDirectory$'/wordlist.Table") or fileReadable("'.wordlistDirectory$'/wordlist.txt") or fileReadable("'.wordlistDirectory$'/LICENSE.txt") if fileReadable("'.wordlistDirectory$'/wordlist.Table") -- 2.11.4.GIT