Skip to content

Commit

Permalink
improve/fix parallel (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
nipsufn authored and Jakub Błaszczyk committed Dec 25, 2019
1 parent 6328aff commit 8d09195
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/tools/update-icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const imgDir = "./generator/img";
const customIconDir = "./resources/custom-icons";
const cssPath = "./generator/css/icons.css";
const jsPath = "./generator/js/icons.js";
const processIconsCmd = `find -iname "*.png" -type f | parallel "mogrify -alpha copy -channel-fx 'red=100%, blue=100%, green=100%' {}"`
const processIconsCmd = `parallel -q mogrify -alpha copy -channel-fx "red=100%,blue=100%,green=100%" ::: $(ls *.png)`

// ----------------------------------------------------------------------------
// Download
Expand Down Expand Up @@ -57,7 +57,7 @@ function unzipAll(src, dest) {
function processAll(path) {
console.log("Processing (this will take a while)...");
return new Promise((resolve, reject) => {
child_process.exec(processIconsCmd, {cwd: path, maxBuffer: 1024*1024*5, shell: true}, (error, stdout, stderr) => {
child_process.exec(processIconsCmd, {cwd: path}, (error, stdout, stderr) => {
if (error) {
reject(error);
}
Expand Down

0 comments on commit 8d09195

Please sign in to comment.