diff iReport.sh @ 1:440f4aa3db97 draft

Added option to dowload iReports
author saskia-hiltemann
date Wed, 30 Jul 2014 07:03:43 -0400
parents ac5f9272033b
children e8755431a0cd
line wrap: on
line diff
--- a/iReport.sh	Tue Jul 01 11:42:23 2014 -0400
+++ b/iReport.sh	Wed Jul 30 07:03:43 2014 -0400
@@ -38,6 +38,9 @@
 items=${items//,/ }; items=${items/ /}
 title=${title//--/}
 title=${title//label/}
+
+reportname=${title// /}
+
 echo -e "\n"
 echo -e "title:      $title"
 echo -e "tabs:       $tabs"
@@ -68,15 +71,28 @@
 cp -R ${repositorypath}/iframe-resizer/ ${galaxypath}/iframe-resizer/
 cp -R ${repositorypath}/DataTables-1.9.4/ ${galaxypath}/DataTables-1.9.4/
 cp ${repositorypath}/jquery.zoom.js ${galaxypath}/jquery.zoom.js
-
+cp ${repositorypath}/jquery-ui.css ${galaxypath}/jquery-ui.css
+cp ${repositorypath}/jquery-1.10.2.js ${galaxypath}/jquery-1.10.2.js
+cp ${repositorypath}/jquery-ui.js ${galaxypath}/jquery-ui.js
 
 echo "done copying resource files"
 ls ${galaxypath}
 
 
 ## Create cover HTML page
-makeIntroPage "$title" $coverimage "report.html" $htmlout
+makeIntroPage "$title" $coverimage "report.html" $htmlout iReport_${reportname}.zip
+
+## Create copy of cover page for downloadable version
+makeIntroPage "$title" $coverimage "report.html" coverpage.html iReport_${reportname}.zip
+cp coverpage.html ${galaxypath}/coverpage.html
 
 ## Create Report page with tabs
 createMainPage ${galaxypath}/report.html "$tabs" "$items" $minwidth
 
+
+## Create zip file of this iReport for download by user
+wd=`pwd`
+cd ${galaxypath}
+zip -r iReport_${reportname} .
+cd $wd
+