Galerie und tage

This commit is contained in:
2021-11-23 17:56:26 +01:00
parent ff35366279
commit 5f873bee89
4693 changed files with 149659 additions and 301447 deletions

View File

@@ -1,31 +1,32 @@
'use strict';
const path = require('path');
const binBuild = require('bin-build');
const log = require('logalot');
const bin = require('.');
var BinBuild = require('bin-build');
var log = require('logalot');
var bin = require('./');
(async () => {
try {
await bin.run(['--version']);
log.success('optipng pre-build test passed successfully');
} catch (error) {
log.warn(error.message);
bin.run(function (err) {
if (err) {
log.warn(err.message);
log.warn('optipng pre-build test failed');
log.info('compiling from source');
try {
// From https://sourceforge.net/projects/optipng/files/OptiPNG/
await binBuild.file(path.resolve(__dirname, '../vendor/source/optipng.tar.gz'), [
`./configure --with-system-zlib --prefix="${bin.dest()}" --bindir="${bin.dest()}"`,
'make install'
]);
new BinBuild()
.src('https://downloads.sourceforge.net/project/optipng/OptiPNG/optipng-0.7.6/optipng-0.7.6.tar.gz')
.cmd([
'./configure --with-system-zlib --prefix="' + bin.dest() + '"',
'--bindir="' + bin.dest() + '"'
].join(' '))
.cmd('make install')
.run(function (err) {
if (err) {
log.error(err.stack);
return;
}
log.success('optipng built successfully');
} catch (error) {
log.error(error.stack);
log.success('optipng built successfully');
});
// eslint-disable-next-line unicorn/no-process-exit
process.exit(1);
}
return;
}
})();
log.success('optipng pre-build test passed successfully');
});