Skip to content

Commit

Permalink
Fix install script on Windows (#17)
Browse files Browse the repository at this point in the history
* Fix install script on Windows

* Update lib/install.js

Co-authored-by: Shogo Sensui <[email protected]>

Co-authored-by: Shogo Sensui <[email protected]>
  • Loading branch information
fisker and 1000ch authored Nov 8, 2021
1 parent cf4faee commit 6b5ef98
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/install.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {fileURLToPath} from 'node:url';
import {promises as fs} from 'node:fs';
import binBuild from 'bin-build';
import bin from './index.js';

Expand All @@ -13,10 +14,11 @@ bin.run([src, dest]).then(() => {
console.warn('guetzli pre-build test failed');
console.info('compiling from source');

await fs.mkdir(bin.dest(), {recursive: true});

try {
const source = fileURLToPath(new URL('../vendor/source/guetzli-1.0.1.tar.gz', import.meta.url));
binBuild.file(source, [
`mkdir -p ${bin.dest()}`,
`make && mv bin/Release/${bin.use()} ${bin.path()}`,
]);

Expand Down

0 comments on commit 6b5ef98

Please sign in to comment.