Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/roundcube/roundcubemail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2016-12-30 18:10:41 +0300
committerThomas Bruederli <thomas@roundcube.net>2016-12-30 18:10:41 +0300
commit40cd8d3bdd8d360f9eae8d98171011942141dae1 (patch)
tree37f9c179a468cda3f4cb97cf2280b1c64a3a70de /bin
parent10f6fb4cc7d47658946778890a00add7ce542c36 (diff)
Add --force option + update install insructions (#5535)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/install-jsdeps.sh15
1 files changed, 8 insertions, 7 deletions
diff --git a/bin/install-jsdeps.sh b/bin/install-jsdeps.sh
index d34fb7f6b..ebc539d88 100755
--- a/bin/install-jsdeps.sh
+++ b/bin/install-jsdeps.sh
@@ -5,7 +5,7 @@
| bin/install-jsdeps.sh |
| |
| This file is part of the Roundcube Webmail client |
- | Copyright (C) 2015, The Roundcube Dev Team |
+ | Copyright (C) 2016, The Roundcube Dev Team |
| |
| Licensed under the GNU General Public License version 3 or |
| any later version with exceptions for skins & plugins. |
@@ -98,7 +98,7 @@ EOL;
//////////////// Functions
/**
- *
+ * Fetch package file from source
*/
function fetch_from_source($package, $useCache = true, &$filetype = null)
{
@@ -107,7 +107,7 @@ function fetch_from_source($package, $useCache = true, &$filetype = null)
$filetype = pathinfo($package['url'], PATHINFO_EXTENSION) ?: 'tmp';
$cache_file = $CACHEDIR . '/' . $package['lib'] . '-' . $package['version'] . '.' . $filetype;
- if (!is_readable($cache_file)) {
+ if (!is_readable($cache_file) || !$useCache) {
echo "Fetching $package[url]\n";
exec(sprintf('%s -s %s -o %s', $CURL, escapeshellarg($package['url']), $cache_file), $out, $retval);
if ($retval !== 0) {
@@ -129,7 +129,7 @@ function fetch_from_source($package, $useCache = true, &$filetype = null)
}
/**
- *
+ * Create a destination javascript file with copyright and license header
*/
function compose_destfile($package, $srcfile)
{
@@ -168,7 +168,7 @@ function compose_destfile($package, $srcfile)
}
/**
- *
+ * Extract a Zip archive into the destination specified by the package config
*/
function extrac_zipfile($package, $srcfile)
{
@@ -252,7 +252,8 @@ function extrac_zipfile($package, $srcfile)
//////////////// Execution
-$WHAT = isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1] : null;
+$args = rcube_utils::get_opt(array('f' => 'force')) + array('force' => false);
+$WHAT = $args[0];
foreach ($SOURCES['dependencies'] as $package) {
if (!isset($package['name'])) {
@@ -265,7 +266,7 @@ foreach ($SOURCES['dependencies'] as $package) {
echo "Installing $package[name]...\n";
- $srcfile = fetch_from_source($package, true, $filetype);
+ $srcfile = fetch_from_source($package, !$args['force'], $filetype);
if ($filetype === 'zip') {
extrac_zipfile($package, $srcfile);