Rev 14220 | Rev 17829 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 80 | bpr | 1 | #! /bin/sh |
| 2 | |||
| 13026 | obado | 3 | # Make distribution tgz packages |
| 80 | bpr | 4 | |
| 3803 | kbelabas | 5 | version=`cat version` |
| 6 | target=$HOME/transfer_wims |
||
| 3805 | bpr | 7 | echo "About to create release tarball wims-$version in $target." |
| 3746 | reyssat | 8 | echo "Did you check your wims package (by hand, checkwims or test suite...)" |
| 9 | echo "and agree to continue this script ? (y/n)? [n] " |
||
| 10 | read ans |
||
| 11 | if [ "$ans" != "y" ] && [ "$ans" != "Y" ]; then |
||
| 7544 | bpr | 12 | exit |
| 3746 | reyssat | 13 | fi |
| 14 | |||
| 4290 | bpr | 15 | cd `dirname $0` |
| 5007 | obado | 16 | |
| 17 | echo "Wims must be compiled to make a fully functional distribution." |
||
| 18 | echo "Do you want to compile now ? (y/n)? [y] " |
||
| 19 | read ans |
||
| 14220 | bpr | 20 | if [ "$ans" = "n" ] || [ "$ans" = "N" ]; then |
| 5007 | obado | 21 | echo "** Continuing without compilation. Assume you did it already.." |
| 22 | else |
||
| 7544 | bpr | 23 | ./compile |
| 5007 | obado | 24 | fi |
| 25 | |||
| 4290 | bpr | 26 | wims_dir=`pwd` |
| 3425 | obado | 27 | echo "** Create or Clean $target..." |
| 80 | bpr | 28 | mkdir -p $target |
| 29 | rm -Rf $target/* |
||
| 30 | |||
| 13026 | obado | 31 | echo "** Export repo in $target/wims" |
| 3451 | obado | 32 | cd `dirname $0` |
| 2842 | reyssat | 33 | svn export . $target/wims |
| 2841 | reyssat | 34 | cd $target/wims |
| 13026 | obado | 35 | # git clone --depth 1 your_repo_url |
| 36 | # rm -rf .git |
||
| 37 | |||
| 3803 | kbelabas | 38 | # disable "maintainer-only" extensions in the exported version : don't run |
| 39 | # autoconf / autoheader |
||
| 40 | rm -f .wims_maintainer_mode |
||
| 2841 | reyssat | 41 | |
| 42 | # call script for permissions |
||
| 43 | bin/changepermissions |
||
| 44 | |||
| 3480 | obado | 45 | echo "** Insert current version number in README.template" |
| 4290 | bpr | 46 | |
| 3803 | kbelabas | 47 | sed -e "s/WIMS_VERSION/$version/" $target/wims/README.template > $target/wims/README |
| 48 | rm -f $target/wims/README.template |
||
| 2905 | bpr | 49 | cp $target/wims/README $target/wims/public_html/README |
| 80 | bpr | 50 | |
| 3480 | obado | 51 | echo "** Create configure file using autoconf" |
| 3803 | kbelabas | 52 | cd $target/wims/src; autoconf; autoheader |
| 82 | bpr | 53 | |
| 8801 | bpr | 54 | echo "** Remove temporary files and wimstest directory" |
| 80 | bpr | 55 | rm -Rf *.cache *.log 2>/dev/null |
| 56 | rm $target/wims/mkdistsvn |
||
| 8801 | bpr | 57 | rm -rf $target/wims/wimstest |
| 9046 | bpr | 58 | rm -rf $target/wims/public_html/modules/moduletest |
| 80 | bpr | 59 | find $target/wims -name .DS_Store -exec rm '{}' \; |
| 13026 | obado | 60 | find $target/wims -name .git* -exec rm '{}' \; |
| 1451 | bpr | 61 | find $target/wims -name \._* -exec rm '{}' \; |
| 11131 | bpr | 62 | rm -rf $target/wims/dfsg |
| 80 | bpr | 63 | |
| 4290 | bpr | 64 | echo "** Copy mathfonts..." |
| 65 | cd $wims_dir |
||
| 7544 | bpr | 66 | for a in `ls -d public_html/mathfonts/*/` ; do |
| 4290 | bpr | 67 | cp $a/* $target/wims/$a |
| 68 | done |
||
| 69 | |||
| 70 | echo "** Copy pieces (in scripts/data/photo) ..." |
||
| 71 | cd $wims_dir |
||
| 72 | data=public_html/scripts/data |
||
| 13940 | bpr | 73 | for a in qpuzzle spuzzle ; do |
| 4290 | bpr | 74 | cp -r $data/$a/pieces $target/wims/$data/$a |
| 13328 | bpr | 75 | cp -r $data/$a/photindex $target/wims/$data/$a/photindex |
| 4290 | bpr | 76 | done |
| 77 | |||
| 13026 | obado | 78 | # Wee copy all generated files (*.min.css and generated icons) |
| 79 | echo "** Copy icones and icone.min.css (in gifs/themes) ..." |
||
| 4371 | bpr | 80 | cd $wims_dir |
| 81 | data=public_html/gifs/themes |
||
| 13940 | bpr | 82 | for a in default wimsedu wimsedu1 wimsedu2 Font_Awesome ; do |
| 4371 | bpr | 83 | cp -r $wims_dir/$data/$a $target/wims/$data/ |
| 84 | done |
||
| 85 | |||
| 4928 | bpr | 86 | echo "** Copy circuits symbols (in gifs/symbols) ..." |
| 87 | cd $wims_dir |
||
| 88 | data=public_html/gifs/symbols |
||
| 89 | cp -r $wims_dir/$data/* $target/wims/$data/ |
||
| 90 | |||
| 4369 | bpr | 91 | echo "** Copy *.jar (in java/) ..." |
| 92 | cd $wims_dir |
||
| 93 | javadir=public_html/java |
||
| 13940 | bpr | 94 | for a in Clicktile WIMSchem zirkel ThreeD Input Lattice ; do |
| 4391 | bpr | 95 | cp -r $javadir/$a/*.jar $target/wims/$javadir/$a/ |
| 4369 | bpr | 96 | done |
| 4991 | bpr | 97 | |
| 98 | ##should be in compile - bin/mkindex ??? |
||
| 99 | ##cp src/Misc/applets/WIMSchem/src/images/*.png public_html/gifs/WIMSchem/ |
||
| 100 | |||
| 4369 | bpr | 101 | javadir=public_html/scripts/authors/jm.evers/applets |
| 13940 | bpr | 102 | for a in `ls $javadir/*.jar` ; do |
| 4369 | bpr | 103 | cp -r $a $target/wims/$javadir/ |
| 104 | done |
||
| 105 | |||
| 13940 | bpr | 106 | echo "** copy canvadraw documentation... " |
| 107 | #cd $wims_dir/src/Misc/canvasdraw |
||
| 108 | #sh canvasinfo.sh 2>/dev/null |
||
| 109 | cd $wims_dir |
||
| 110 | canvasdraw_dir=public_html/scripts/help |
||
| 111 | cp -r $canvasdraw_dir/canvas_examples $target/wims/$canvasdraw_dir |
||
| 14082 | bpr | 112 | cp $canvasdraw_dir/en/canvasdraw.phtml $target/wims/$canvasdraw_dir/en |
| 13940 | bpr | 113 | |
| 13037 | bpr | 114 | echo "** Copy themes/css.css and delete the css compressor..." |
| 8029 | bpr | 115 | compressor=yuicompressor-2.4.8.jar |
| 116 | compressorlink=yuicompressor |
||
| 10698 | bpr | 117 | themes="standard default Nikaia" |
| 7544 | bpr | 118 | cd $wims_dir |
| 6286 | bpr | 119 | css_dir=public_html/themes |
| 12604 | bpr | 120 | for a in $themes ; do |
| 6286 | bpr | 121 | cp -r $css_dir/$a/css.css $target/wims/$css_dir/$a |
| 12604 | bpr | 122 | done |
| 13095 | bpr | 123 | ##no more useful ?? |
| 13051 | bpr | 124 | cp $css_dir/icon $target/wims/$css_dir |
| 9942 | bpr | 125 | rm $target/wims/$css_dir/$compressor ; rm $target/wims/$css_dir/$compressorlink |
| 13037 | bpr | 126 | rm -rf $target/wims/$css_dir/_packages |
| 12663 | bpr | 127 | rm -f $target/wims/.gitignore |
| 6286 | bpr | 128 | |
| 3750 | bpr | 129 | echo "** Archiving WIMS package..." |
| 3803 | kbelabas | 130 | cd $target/wims ; tar -czf ../wims-$version.tgz . |