#!/usr/bin/env php $dep) { $dep = array_map('trim', $dep); // revision $rev = isset($dep['version']) ? "/tags/{$dep['version']}" : '/branches/master'; // install dir $installDir = isset($dep['target']) ? $vendorDir . '/' . $dep['target'] : $vendorDir . '/' . $name; if (file_exists($installDir)) { echo "> Target dep exists: $name\n"; } else { echo "> Installing $name\n"; // url if (!isset($dep['git'])) { exit(sprintf('The "git" value for the "%s" dependency must be set.', $name)); } $url = $dep['git']; $githubPos = strpos($url, 'github.com'); if(false === $githubPos) { echo "> $name is not located in github.com\n"; } else { $url = 'https://' . substr($url, $githubPos) . $rev; } system(sprintf('svn export %s %s', escapeshellarg($url), escapeshellarg($installDir))); } } // php on windows can't use the shebang line from system() $interpreter = PHP_OS == 'WINNT' ? 'php.exe' : ''; // Update the bootstrap files system(sprintf('%s %s %s', $interpreter, escapeshellarg($rootDir . '/vendor/bundles/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php'), escapeshellarg($rootDir))); // Update assets system(sprintf('%s %s assets:install %s', $interpreter, escapeshellarg($rootDir . '/app/console'), escapeshellarg($rootDir . '/web/'))); // Remove the cache system(sprintf('%s %s cache:clear --no-warmup', $interpreter, escapeshellarg($rootDir . '/app/console')));