summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/installto.sh2
-rwxr-xr-xbin/jsshrink.sh4
-rwxr-xr-xbin/update.sh21
3 files changed, 25 insertions, 2 deletions
diff --git a/bin/installto.sh b/bin/installto.sh
index 12d317e12..4be6528a2 100755
--- a/bin/installto.sh
+++ b/bin/installto.sh
@@ -54,7 +54,7 @@ if (strtolower($input) == 'y') {
break;
}
}
- foreach (array('index.php','.htaccess','config/defaults.inc.php','composer.json-dist','CHANGELOG','README.md','UPGRADING','LICENSE') as $file) {
+ foreach (array('index.php','.htaccess','config/defaults.inc.php','composer.json-dist','CHANGELOG','README.md','UPGRADING','LICENSE','INSTALL') as $file) {
if (!system("rsync -av " . INSTALL_PATH . "$file $target_dir/$file")) {
$err = true;
break;
diff --git a/bin/jsshrink.sh b/bin/jsshrink.sh
index f7c7b22e9..0890a5c40 100755
--- a/bin/jsshrink.sh
+++ b/bin/jsshrink.sh
@@ -9,7 +9,9 @@ CLOSURE_COMPILER_URL='http://dl.google.com/closure-compiler/compiler-20131014.zi
do_shrink() {
rm -f "$2"
- java -jar $JAR_DIR/compiler.jar --compilation_level=SIMPLE_OPTIMIZATIONS --js="$1" --js_output_file="$2" --language_in="$3"
+ # copy the first comment block with license information for LibreJS
+ grep -q '@lic' $1 && sed -n '/\/\*/,/\*\// { p; /\*\//q; }' $1 > $2
+ java -jar $JAR_DIR/compiler.jar --compilation_level=SIMPLE_OPTIMIZATIONS --js="$1" --language_in="$3" >> $2
}
if [ ! -d "$JS_DIR" ]; then
diff --git a/bin/update.sh b/bin/update.sh
index 26314408c..1dfaa961d 100755
--- a/bin/update.sh
+++ b/bin/update.sh
@@ -181,6 +181,27 @@ if ($RCI->configured) {
*/
}
+ // update the repositories section with the new dependencies
+ if (is_array($composer_template['repositories'])) {
+ if (!is_array($composer_data['repositories'])) {
+ $composer_data['repositories'] = array();
+ }
+
+ foreach ($composer_template['repositories'] as $repo) {
+ $rkey = $repo['type'] . $repo['url'] . $repo['package']['name'];
+ $existing = false;
+ foreach ($composer_data['repositories'] as $_repo) {
+ if ($rkey == $_repo['type'] . $_repo['url'] . $_repo['package']['name']) {
+ $existing = true;
+ break;
+ }
+ }
+ if (!$existing) {
+ $composer_data['repositories'][] = $repo;
+ }
+ }
+ }
+
// use the JSON encoder from the Composer package
if (is_file('composer.phar')) {
include 'phar://composer.phar/src/Composer/Json/JsonFile.php';