"Fossies" - the Fresh Open Source Software Archive

Member "squidanalyzer-6.6/resources/update_rsc_files.sh" (7 May 2017, 1860 Bytes) of package /linux/privat/squidanalyzer-6.6.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 and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/sh
    2 #-----------------------------------------------------------------------------
    3 #
    4 # Script used to update squidanalyzer resources files.
    5 # The script must be run in the resources directory.
    6 #
    7 # Files are minified using yui-compressor.
    8 #-----------------------------------------------------------------------------
    9 
   10 # Create the temporary directory 
   11 mkdir orig/ 2>/dev/null
   12 rm flotr2.js
   13 
   14 # Get sorttable.js file
   15 wget https://kryogenix.org/code/browser/sorttable/sorttable.js -O orig/sorttable.js
   16 
   17 # SquidAnalyzer use a modified version of the library, apply patch
   18 patch -p 1 orig/sorttable.js < sa-sorttable.diff
   19 
   20 yui-compressor orig/sorttable.js -o orig/sorttable.min.js
   21 
   22 # Update the flotr2.js script
   23 wget https://raw.githubusercontent.com/HumbleSoftware/Flotr2/master/flotr2.nolibs.js -O orig/flotr2.nolibs.js
   24 
   25 yui-compressor orig/flotr2.nolibs.js -o orig/flotr2.min.js
   26 
   27 # Update the bean.js script
   28 wget https://github.com/fat/bean/archive/v1.0.14.tar.gz
   29 tar xzf v1.0.14.tar.gz  bean-1.0.14/src/bean.js
   30 cp bean-1.0.14/src/bean.js orig/
   31 rm -rf bean-1.0.14/
   32 rm v1.0.14.tar.gz
   33 
   34 yui-compressor orig/bean.js -o orig/bean.min.js
   35 
   36 # Update underscore.js
   37 wget http://underscorejs.org/underscore.js -O orig/underscore.js
   38 
   39 yui-compressor orig/underscore.js -o orig/underscore.min.js
   40 
   41 cat squidanalyzer.js >> flotr2.js
   42 echo "/* bean.min.js: see https://github.com/darold/squidanalyzer/tree/master/resources/LICENSE */" >> flotr2.js
   43 cat orig/bean.min.js >> flotr2.js
   44 echo "/* underscore.min.js: see https://github.com/darold/squidanalyzer/tree/master/resources/LICENSE */" >> flotr2.js
   45 cat orig/underscore.min.js >> flotr2.js
   46 echo "/* flotr2.min.js: see https://github.com/darold/squidanalyzer/tree/master/resources/LICENSE */" >> flotr2.js
   47 cat orig/flotr2.min.js >> flotr2.js
   48 
   49 cp orig/sorttable.min.js sorttable.js
   50 
   51 # Remove temporary directory
   52 rm -rf orig/
   53 
   54