"Fossies" - the Fresh Open Source Software Archive

Member "flow-4.0.8/scripts/updatePushJSVersion.sh" (26 Nov 2020, 1131 Bytes) of package /linux/www/vaadin-flow-4.0.8.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/bash
    2 
    3 
    4 if [ "$#" != "1" ]
    5 then
    6     echo "Usage: $0 <js version>"
    7     exit 1
    8 fi
    9 VERSION=$1
   10 DIR=`dirname $0`
   11 GID=com.vaadin.external.atmosphere.client
   12 AID=javascript
   13 
   14 ARTIFACT=$GID:$AID:$VERSION:war
   15 mvn dependency:copy -Dartifact=$ARTIFACT -DoutputDirectory=$DIR/vaadinPush
   16 
   17 (
   18 echo "window.vaadinPush = window.vaadinPush|| {};"
   19 echo "(function(define) {"
   20 unzip -p $DIR/vaadinPush/$AID-$VERSION.war javascript/atmosphere.js
   21 echo "if (window.console) {"
   22 echo "  window.console.log(\"Vaadin push loaded\");"
   23 echo "}"
   24 echo "}).call(window.vaadinPush);"
   25 ) > $DIR/../flow-push/src/main/resources/META-INF/resources/VAADIN/static/push/vaadinPush.js
   26 
   27 # Minify
   28 
   29 
   30 curl -s http://central.maven.org/maven2/com/yahoo/platform/yui/yuicompressor/2.4.8/yuicompressor-2.4.8.jar > $DIR/vaadinPush/yuicompressor-2.4.8.jar
   31 java -jar $DIR/vaadinPush/yuicompressor-2.4.8.jar  $DIR/../flow-push/src/main/resources/META-INF/resources/VAADIN/static/push/vaadinPush.js  > $DIR/../flow-push/src/main/resources/META-INF/resources/VAADIN/static/push/vaadinPush-min.js
   32 
   33 
   34 rm -f $DIR/vaadinPush/yuicompressor-2.4.8.jar
   35 rm -f $DIR/vaadinPush/$AID-$VERSION.war