Skip to content

Commit

Permalink
Fixed a bug with file names having weird characters, wrapping them in…
Browse files Browse the repository at this point in the history
… double-quotes
  • Loading branch information
pareshchouhan committed Aug 1, 2019
1 parent 04d1ed8 commit a942b51
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function generateWindowsPS1Script(uniqueURLS) {
let windowsPSCmd = `mkdir -p wikiart-dl
cd wikiart-dl
echo 'Starting download'\n`;
windowsPSCmd += uniqueURLS.map(url => `Invoke-WebRequest ${url}`).join('\n');
windowsPSCmd += uniqueURLS.map(url => `Invoke-WebRequest "${url}"`).join('\n');
windowsPSCmd += `\necho 'Done Downloading'`;
return windowsPSCmd;
}
Expand All @@ -72,7 +72,7 @@ function generateLinuxCURLScript(uniqueURLS) {
mkdir -p wikiart-dl
cd wikiart-dl
echo 'Starting download'\n`;
linuxCURL += uniqueURLS.map(url => `curl ${url}`).join('\n');
linuxCURL += uniqueURLS.map(url => `curl -O "${url}"`).join('\n');
linuxCURL += `\necho 'Done Downloading'`;
return linuxCURL;
}
Expand All @@ -82,7 +82,7 @@ function generateLinuxWgetScript(uniqueURLS) {
mkdir -p wikiart-dl
cd wikiart-dl
echo 'Starting download'\n`;
linuxWGET += uniqueURLS.map(url => `wget ${url}`).join('\n');
linuxWGET += uniqueURLS.map(url => `wget "${url}"`).join('\n');
linuxWGET += `\necho 'Done Downloading'`;
return linuxWGET;
}
Expand All @@ -92,7 +92,7 @@ function generateOSXCURLScript(uniqueURLS) {
mkdir -p wikiart-dl
cd wikiart-dl
echo 'Starting download'\n`;
OSCURL += uniqueURLS.map(url => `curl ${url}`).join('\n');
OSCURL += uniqueURLS.map(url => `curl -O "${url}"`).join('\n');
OSCURL += `\necho 'Done Downloading'`;
return OSCURL;
}
Expand Down

0 comments on commit a942b51

Please sign in to comment.