Subversion Repositories wimsdev

Rev

Rev 13940 | Rev 14220 | 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
20
if [ "$ans" == "n" ] || [ "$ans" == "N" ]; then
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
 
10833 bpr 64
#### provisoire
65
rm -rf $target/wims/public_html/scripts/js/laruche
66
rm -rf $target/wims/public_html/modules/adm/tool/laruche
67
 
4290 bpr 68
echo "** Copy mathfonts..."
69
cd $wims_dir
7544 bpr 70
for a in `ls -d public_html/mathfonts/*/` ;  do
4290 bpr 71
  cp $a/* $target/wims/$a
72
done
73
 
74
echo "** Copy pieces (in scripts/data/photo) ..."
75
cd $wims_dir
76
data=public_html/scripts/data
13940 bpr 77
for a in qpuzzle spuzzle ; do
4290 bpr 78
  cp -r $data/$a/pieces $target/wims/$data/$a
13328 bpr 79
  cp -r $data/$a/photindex $target/wims/$data/$a/photindex
4290 bpr 80
done
81
 
13026 obado 82
# Wee copy all generated files (*.min.css and generated icons)
83
echo "** Copy icones and icone.min.css (in gifs/themes) ..."
4371 bpr 84
cd $wims_dir
85
data=public_html/gifs/themes
13940 bpr 86
for a in default wimsedu wimsedu1 wimsedu2 Font_Awesome ; do
4371 bpr 87
  cp -r $wims_dir/$data/$a $target/wims/$data/
88
done
89
 
4928 bpr 90
echo "** Copy circuits symbols (in gifs/symbols) ..."
91
cd $wims_dir
92
data=public_html/gifs/symbols
93
cp -r $wims_dir/$data/* $target/wims/$data/
94
 
4369 bpr 95
echo "** Copy *.jar (in java/) ..."
96
cd $wims_dir
97
javadir=public_html/java
13940 bpr 98
for a in Clicktile WIMSchem zirkel ThreeD Input Lattice ; do
4391 bpr 99
  cp -r $javadir/$a/*.jar $target/wims/$javadir/$a/
4369 bpr 100
done
4991 bpr 101
 
102
##should be in compile - bin/mkindex  ???
103
##cp src/Misc/applets/WIMSchem/src/images/*.png public_html/gifs/WIMSchem/
104
 
4369 bpr 105
javadir=public_html/scripts/authors/jm.evers/applets
13940 bpr 106
for a in `ls $javadir/*.jar` ; do
4369 bpr 107
  cp -r $a $target/wims/$javadir/
108
done
109
 
13940 bpr 110
echo "** copy canvadraw documentation... "
111
#cd $wims_dir/src/Misc/canvasdraw
112
#sh canvasinfo.sh 2>/dev/null
113
cd $wims_dir
114
canvasdraw_dir=public_html/scripts/help
115
cp -r $canvasdraw_dir/canvas_examples $target/wims/$canvasdraw_dir
14082 bpr 116
cp $canvasdraw_dir/en/canvasdraw.phtml $target/wims/$canvasdraw_dir/en
13940 bpr 117
 
13037 bpr 118
echo "** Copy themes/css.css and delete the css compressor..."
8029 bpr 119
compressor=yuicompressor-2.4.8.jar
120
compressorlink=yuicompressor
10698 bpr 121
themes="standard default Nikaia"
7544 bpr 122
cd $wims_dir
6286 bpr 123
css_dir=public_html/themes
12604 bpr 124
for a in $themes ; do
6286 bpr 125
  cp -r $css_dir/$a/css.css $target/wims/$css_dir/$a
12604 bpr 126
done
13095 bpr 127
##no more useful ??
13051 bpr 128
cp $css_dir/icon $target/wims/$css_dir
9942 bpr 129
rm $target/wims/$css_dir/$compressor ; rm $target/wims/$css_dir/$compressorlink
13037 bpr 130
rm -rf $target/wims/$css_dir/_packages
12663 bpr 131
rm -f $target/wims/.gitignore
6286 bpr 132
 
3750 bpr 133
echo "** Archiving WIMS package..."
3803 kbelabas 134
cd $target/wims ; tar -czf ../wims-$version.tgz .