<commit_before>'use strict';

var bin = require('./');
var BinBuild = require('bin-build');
var logSymbols = require('log-symbols');
var path = require('path');

/**
 * Install binary and check whether it works.
 * If the test fails, try to build it.
 */

bin.run(['--version'], function (err) {
	if (err) {
		console.log(logSymbols.warning + ' pre-build test failed, compiling from source...');

		var builder = new BinBuild()
			.src('http://www.lcdf.org/gifsicle/gifsicle-' + bin.v + '.tar.gz')
			.cmd('.' + path.sep + 'configure --disable-gifview --disable-gifdiff --prefix="' + bin.dest() + '" --bindir="' + bin.dest() + '"')
			.cmd('make install');

		return builder.build(function (err) {
			if (err) {
				console.log(logSymbols.error, err);
				return;
			}

			console.log(logSymbols.success + ' gifsicle built successfully!');
		});
	}

	console.log(logSymbols.success + ' pre-build test passed successfully!');
});
<commit_msg>Small tweak<commit_after>'use strict';

var bin = require('./');
var BinBuild = require('bin-build');
var logSymbols = require('log-symbols');

/**
 * Install binary and check whether it works.
 * If the test fails, try to build it.
 */

bin.run(['--version'], function (err) {
	if (err) {
		console.log(logSymbols.warning + ' pre-build test failed, compiling from source...');

		var cfg = [
			'./configure --disable-gifview --disable-gifdiff',
			'--prefix="' + bin.dest() + '" --bindir="' + bin.dest() + '"'
		].join(' ');

		var builder = new BinBuild()
			.src('http://www.lcdf.org/gifsicle/gifsicle-' + bin.v + '.tar.gz')
			.cmd(cfg)
			.cmd('make install');

		return builder.build(function (err) {
			if (err) {
				console.log(logSymbols.error, err);
				return;
			}

			console.log(logSymbols.success + ' gifsicle built successfully!');
		});
	}

	console.log(logSymbols.success + ' pre-build test passed successfully!');
});

{'fraction_non_alphanumeric': 0.19680851063829788, 'fraction_numerical': 0.0, 'mean_word_length': 3.3846153846153846, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4461357', 'n_tokens_mistral': 694, 'n_tokens_neox': 625, 'n_words': 152}