Install Bootstrap and LessJS with install-jsdeps.sh

pull/5742/merge
Aleksander Machniak 6 years ago
parent 997f317654
commit 4a7603a207

@ -122,7 +122,7 @@ function fetch_from_source($package, $useCache = true, &$filetype = null)
echo "Fetching {$package['url']}\n";
if ($CURL)
exec(sprintf('%s -s %s -o %s', $CURL, escapeshellarg($package['url']), $cache_file), $out, $retval);
exec(sprintf('%s -L -s %s -o %s', $CURL, escapeshellarg($package['url']), $cache_file), $out, $retval);
else
exec(sprintf('%s -q %s -O %s', $WGET, escapeshellarg($package['url']), $cache_file), $out, $retval);
@ -232,20 +232,22 @@ function extract_zipfile($package, $srcfile)
if (!is_dir($extract)) {
mkdir($extract, 0774, true);
}
exec(sprintf('%s -o %s -d %s', $UNZIP, escapeshellarg($srcfile), $extract), $out, $retval);
$zip_command = '%s -' . ($package['flat'] ? 'j' : 'o') . ' %s -d %s';
exec(sprintf($zip_command, $UNZIP, escapeshellarg($srcfile), $extract), $out, $retval);
// get the root folder of the extracted package
$extract_tree = glob("$extract/*", GLOB_ONLYDIR);
$sourcedir = $extract_tree[0];
$sourcedir = count($extract_tree) ? $extract_tree[0] : $extract;
foreach ($package['map'] as $src => $dest) {
echo "Installing files $sourcedir/$src into $destdir/$dest\n";
echo "Installing $sourcedir/$src into $destdir/$dest\n";
// make sure the destination's parent directory exists
if (strpos($dest, '/') !== false) {
$parentdir = dirname($destdir . '/' . $dest);
if (!is_dir($parentdir)) {
mkdir($parentdir, 0774, true);
mkdir($parentdir, 0775, true);
}
}

@ -82,6 +82,30 @@
"addon/selection": "addon/selection",
"mode/sieve": "mode/sieve"
}
},
{
"lib": "bootstrap",
"name": "Bootstrap",
"version": "4.0.0",
"url": "https://github.com/twbs/bootstrap/releases/download/v4.0.0/bootstrap-4.0.0-dist.zip",
"dest": "skins/elastic/deps",
"sha1": "108a534a0934b3b24e7366f59c74d2b8d3dd9004",
"license": "MIT",
"flat": true,
"map": {
"bootstrap.bundle.min.js": "bootstrap.bundle.min.js",
"bootstrap.min.css": "bootstrap.min.css"
}
},
{
"lib": "less",
"name": "LessJS",
"version": "2.7.3",
"url": "https://raw.githubusercontent.com/less/less.js/v2.7.3/dist/less.min.js",
"dest": "skins/elastic/deps/less.min.js",
"sha1": "45ea4f9fed6c0568ec11faba048c3e3cb7612e9e",
"license": "Apache-2.0",
"source": "https://raw.githubusercontent.com/less/less.js/v2.7.3/dist/less.js"
}
]
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -7,7 +7,7 @@
<roundcube:object name="message" id="messagestack" />
<script src="/bootstrap/bootstrap.bundle.min.js"></script>
<script src="/deps/bootstrap.bundle.min.js"></script>
<script src="/ui.js"></script>
</body>

@ -15,11 +15,11 @@
<title><roundcube:object name="pagetitle" /></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no, maximum-scale=1.0" id="viewport">
<link rel="shortcut icon" href="/images/favicon.ico">
<link rel="stylesheet" href="/bootstrap/bootstrap.min.css">
<link rel="stylesheet" href="/deps/bootstrap.min.css">
<roundcube:if condition="config:devel_mode" />
<link rel="stylesheet/less" href="/styles/styles.less">
<roundcube:link rel="stylesheet/less" href="/styles/print.less" condition="env:action == 'print'" />
<script src="/styles/less.min.js" data-env="development"></script>
<script src="/deps/less.min.js" data-env="development"></script>
<roundcube:else />
<link rel="stylesheet" href="/styles/styles.css">
<roundcube:link rel="stylesheet" href="/styles/print.css" condition="env:action == 'print'" />

Loading…
Cancel
Save