Fix js-deps check and installation

pull/5890/head
Thomas Bruederli 8 years ago
parent e1d57aadfa
commit 03cea6c6c9

@ -50,7 +50,7 @@ if (empty($CURL) && empty($WGET)) {
$CACHEDIR = sys_get_temp_dir();
if (is_writeable(INSTALL_PATH . 'temp/js_cache') || mkdir(INSTALL_PATH . 'temp/js_cache', 0774, true)) {
if (is_writeable(INSTALL_PATH . 'temp/js_cache') || @mkdir(INSTALL_PATH . 'temp/js_cache', 0774, true)) {
$CACHEDIR = INSTALL_PATH . 'temp/js_cache';
}

@ -102,8 +102,8 @@ if (strtolower($input) == 'y') {
// check if js-deps are up-to-date
$jsdeps = json_decode(file_get_contents("$target_dir/jsdeps.json"));
$package = $jsdeps->dependencies[0];
$dest_file = $target_dir . '/' . $package['dest'];
if (!file_exists($dest_file) || sha1_file($dest_file) !== $package['sha1']) {
$dest_file = $target_dir . '/' . $package->dest;
if (!file_exists($dest_file) || sha1_file($dest_file) !== $package->sha1) {
echo "Installing JavaScript dependencies...";
system("cd $target_dir && bin/install-jsdeps.sh");
echo "done.\n\n";

Loading…
Cancel
Save