1- #! /bin/bash
1+ #! /bin/sh
22# /**
33# * ---------------------------------------------------------------------
44# * GLPI - Gestionnaire Libre de Parc Informatique
7373 echo " $RELEASE has not been found in setup.php. Exiting."
7474 exit 1;
7575fi
76- if grep --quiet $RELEASE fusioninventory.xml; then
77- echo " $RELEASE found in fusioninventory.xml, OK."
78- else
79- echo " $RELEASE has not been found in fusioninventory.xml. Exiting."
80- exit 1;
81- fi
76+ # if grep --quiet $RELEASE fusioninventory.xml; then
77+ # echo "$RELEASE found in fusioninventory.xml, OK."
78+ # else
79+ # echo "$RELEASE has not been found in fusioninventory.xml. Exiting."
80+ # exit 1;
81+ # fi
8282if grep --quiet $RELEASE js/footer.js; then
8383 echo " $RELEASE found in js/footer.js, OK."
8484else
@@ -92,6 +92,18 @@ if ! xmllint --noout fusioninventory.xml; then
9292 exit 1;
9393fi
9494
95+ echo " Remove vendor if exists"
96+ \r m -fr vendor
97+
98+ echo " Remove all minify js files"
99+ find ./ -type f -name " *.min.js" -exec \r m {} \;
100+
101+ echo " Minify javascripts"
102+ find ./ -type f \
103+ -name " *.js" ! -name " *.min.*" ! -name " vfs_fonts*" \
104+ -exec echo {} \; \
105+ -exec sh -c ' uglifyjs -o "${1%.*}.min.js" "$1"' sh {} \;
106+
95107echo " Retrieve PHP vendor"
96108composer install --no-dev --optimize-autoloader --prefer-dist --quiet
97109
@@ -101,9 +113,6 @@ sed \
101113 -e ' s/ SNAPSHOT//' \
102114 -i ' ' setup.php
103115
104- echo " Minify stylesheets and javascripts"
105- $INIT_PWD /vendor/bin/robo minify
106-
107116echo " Compile locale files"
108117./tools/update_mo.pl
109118
0 commit comments