Rev 18044 | 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 | |
18044 | bpr | 17 | echo "WIMS must be compiled to make a fully functional distribution." |
5007 | obado | 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 |
18044 | bpr | 34 | echo "** copy src/configure" |
35 | cp src/configure $target/wims/src |
||
36 | |||
2841 | reyssat | 37 | cd $target/wims |
13026 | obado | 38 | # git clone --depth 1 your_repo_url |
39 | # rm -rf .git |
||
40 | |||
3803 | kbelabas | 41 | # disable "maintainer-only" extensions in the exported version : don't run |
42 | # autoconf / autoheader |
||
43 | rm -f .wims_maintainer_mode |
||
2841 | reyssat | 44 | |
45 | # call script for permissions |
||
46 | bin/changepermissions |
||
47 | |||
3480 | obado | 48 | echo "** Insert current version number in README.template" |
4290 | bpr | 49 | |
3803 | kbelabas | 50 | sed -e "s/WIMS_VERSION/$version/" $target/wims/README.template > $target/wims/README |
51 | rm -f $target/wims/README.template |
||
2905 | bpr | 52 | cp $target/wims/README $target/wims/public_html/README |
80 | bpr | 53 | |
17829 | bpr | 54 | #echo "** Create configure file using autoconf" |
55 | #cd $target/wims/src; autoconf; autoheader |
||
8801 | bpr | 56 | echo "** Remove temporary files and wimstest directory" |
80 | bpr | 57 | rm -Rf *.cache *.log 2>/dev/null |
58 | rm $target/wims/mkdistsvn |
||
8801 | bpr | 59 | rm -rf $target/wims/wimstest |
9046 | bpr | 60 | rm -rf $target/wims/public_html/modules/moduletest |
80 | bpr | 61 | find $target/wims -name .DS_Store -exec rm '{}' \; |
13026 | obado | 62 | find $target/wims -name .git* -exec rm '{}' \; |
1451 | bpr | 63 | find $target/wims -name \._* -exec rm '{}' \; |
11131 | bpr | 64 | rm -rf $target/wims/dfsg |
80 | bpr | 65 | |
4290 | bpr | 66 | echo "** Copy mathfonts..." |
67 | cd $wims_dir |
||
7544 | bpr | 68 | for a in `ls -d public_html/mathfonts/*/` ; do |
4290 | bpr | 69 | cp $a/* $target/wims/$a |
70 | done |
||
71 | |||
72 | echo "** Copy pieces (in scripts/data/photo) ..." |
||
73 | cd $wims_dir |
||
74 | data=public_html/scripts/data |
||
13940 | bpr | 75 | for a in qpuzzle spuzzle ; do |
4290 | bpr | 76 | cp -r $data/$a/pieces $target/wims/$data/$a |
13328 | bpr | 77 | cp -r $data/$a/photindex $target/wims/$data/$a/photindex |
4290 | bpr | 78 | done |
79 | |||
13026 | obado | 80 | # Wee copy all generated files (*.min.css and generated icons) |
81 | echo "** Copy icones and icone.min.css (in gifs/themes) ..." |
||
4371 | bpr | 82 | cd $wims_dir |
83 | data=public_html/gifs/themes |
||
13940 | bpr | 84 | for a in default wimsedu wimsedu1 wimsedu2 Font_Awesome ; do |
4371 | bpr | 85 | cp -r $wims_dir/$data/$a $target/wims/$data/ |
86 | done |
||
87 | |||
4928 | bpr | 88 | echo "** Copy circuits symbols (in gifs/symbols) ..." |
89 | cd $wims_dir |
||
90 | data=public_html/gifs/symbols |
||
91 | cp -r $wims_dir/$data/* $target/wims/$data/ |
||
92 | |||
4369 | bpr | 93 | echo "** Copy *.jar (in java/) ..." |
94 | cd $wims_dir |
||
95 | javadir=public_html/java |
||
13940 | bpr | 96 | for a in Clicktile WIMSchem zirkel ThreeD Input Lattice ; do |
4391 | bpr | 97 | cp -r $javadir/$a/*.jar $target/wims/$javadir/$a/ |
4369 | bpr | 98 | done |
4991 | bpr | 99 | |
100 | ##should be in compile - bin/mkindex ??? |
||
101 | ##cp src/Misc/applets/WIMSchem/src/images/*.png public_html/gifs/WIMSchem/ |
||
102 | |||
4369 | bpr | 103 | javadir=public_html/scripts/authors/jm.evers/applets |
13940 | bpr | 104 | for a in `ls $javadir/*.jar` ; do |
4369 | bpr | 105 | cp -r $a $target/wims/$javadir/ |
106 | done |
||
107 | |||
17936 | bpr | 108 | echo "** Copy *.pdf (in doc/1028/) ..." |
109 | cd $wims_dir |
||
110 | data=public_html/bases/doc/1028/files/tikz |
||
111 | cp -r $wims_dir/$data/*.pdf $target/wims/$data |
||
112 | |||
13940 | bpr | 113 | echo "** copy canvadraw documentation... " |
114 | #cd $wims_dir/src/Misc/canvasdraw |
||
115 | #sh canvasinfo.sh 2>/dev/null |
||
116 | cd $wims_dir |
||
117 | canvasdraw_dir=public_html/scripts/help |
||
118 | cp -r $canvasdraw_dir/canvas_examples $target/wims/$canvasdraw_dir |
||
14082 | bpr | 119 | cp $canvasdraw_dir/en/canvasdraw.phtml $target/wims/$canvasdraw_dir/en |
13940 | bpr | 120 | |
13037 | bpr | 121 | echo "** Copy themes/css.css and delete the css compressor..." |
8029 | bpr | 122 | compressor=yuicompressor-2.4.8.jar |
123 | compressorlink=yuicompressor |
||
10698 | bpr | 124 | themes="standard default Nikaia" |
7544 | bpr | 125 | cd $wims_dir |
6286 | bpr | 126 | css_dir=public_html/themes |
12604 | bpr | 127 | for a in $themes ; do |
6286 | bpr | 128 | cp -r $css_dir/$a/css.css $target/wims/$css_dir/$a |
12604 | bpr | 129 | done |
13095 | bpr | 130 | ##no more useful ?? |
13051 | bpr | 131 | cp $css_dir/icon $target/wims/$css_dir |
9942 | bpr | 132 | rm $target/wims/$css_dir/$compressor ; rm $target/wims/$css_dir/$compressorlink |
13037 | bpr | 133 | rm -rf $target/wims/$css_dir/_packages |
12663 | bpr | 134 | rm -f $target/wims/.gitignore |
6286 | bpr | 135 | |
3750 | bpr | 136 | echo "** Archiving WIMS package..." |
18382 | bpr | 137 | cd $target/wims ; tar -c --no-xattrs -z -f ../wims-$version.tgz . |