udpate osx packaging script

time-shift
Houtan Bastani 2012-06-12 11:52:43 +02:00
parent 661531ebff
commit ed5470d62e
1 changed files with 84 additions and 76 deletions

View File

@ -2,15 +2,13 @@
set -ex
TOP_DIR=/Users/Houtan/Documents/DYNARE
TOP_DIR=/Users/Houtan/Documents/DYNARE/PACKAGES
TOP_DYN_DIR=$TOP_DIR/dynare
VERSION=4.2.2
VERSION=4.3
INSTALLDIRNAME=dynare-$VERSION-osx
mkdir $INSTALLDIRNAME
INSTALLDIR=$TOP_DIR/$INSTALLDIRNAME
mkdir $INSTALLDIR
PATH=${PATH}:/Applications/Octave.app/Contents/Resources/bin:/usr/local/bin:/usr/local/sbin:/usr/texbin:/usr/local/include:/usr/local/lib:/usr/local/libexec:/usr/local/share:/usr/local/Cellar/
########################
# UPDATE DYNARE SOURCE #
@ -23,24 +21,28 @@ autoreconf -si
# BEGIN MAKING PACKAGE #
########################
# create directories
mkdir "$INSTALLDIR/doc"
mkdir "$INSTALLDIR/doc/dynare++"
mkdir "$INSTALLDIR/doc/dynare.html"
mkdir "$INSTALLDIR/scripts"
mkdir "$INSTALLDIR/dynare++"
mkdir "$INSTALLDIR/mex"
mkdir "$INSTALLDIR/mex/octave"
mkdir "$INSTALLDIR/mex/matlab"
mkdir "$INSTALLDIR/mex/matlab/osx64"
mkdir -p "$INSTALLDIR/doc/dynare++"
mkdir "$INSTALLDIR/doc/dynare.html"
mkdir -p "$INSTALLDIR/contrib/ms-sbvar/TZcode"
mkdir -p "$INSTALLDIR/mex/octave"
mkdir -p "$INSTALLDIR/mex/matlab/osx64"
mkdir "$INSTALLDIR/mex/matlab/osx32-7.4"
mkdir "$INSTALLDIR/mex/matlab/osx32-7.5-7.13"
mkdir "$INSTALLDIR/mex/matlab/osx32-7.5-7.14"
# top level
cp $TOP_DYN_DIR/dynare.el $INSTALLDIR
cp $TOP_DYN_DIR/scripts/dynare.el $INSTALLDIR/scripts
cp $TOP_DYN_DIR/license.txt $INSTALLDIR
cp $TOP_DYN_DIR/NEWS $INSTALLDIR
# matlab
# Matlab
cp -r $TOP_DYN_DIR/matlab $INSTALLDIR
# TZ Matlab
cp -r $TOP_DYN_DIR/contrib/ms-sbvar/TZcode/MatlabFiles $INSTALLDIR/contrib/ms-sbvar/TZcode
# examples
cp -r $TOP_DYN_DIR/examples $INSTALLDIR
@ -60,52 +62,55 @@ make
cp $TOP_DYN_DIR/preprocessor/dynare_m $INSTALLDIR/matlab
# Matlab
cp $TOP_DYN_DIR/mex/build/matlab/block_kalman_filter/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.4
cp $TOP_DYN_DIR/mex/build/matlab/bytecode/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.4
cp $TOP_DYN_DIR/mex/build/matlab/dynare_simul_/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.4
cp $TOP_DYN_DIR/mex/build/matlab/estimation/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.4
cp $TOP_DYN_DIR/mex/build/matlab/gensylv/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.4
cp $TOP_DYN_DIR/mex/build/matlab/k_order_perturbation/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.4
cp $TOP_DYN_DIR/mex/build/matlab/kalman_steady_state/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.4
cp $TOP_DYN_DIR/mex/build/matlab/kronecker/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.4
cp $TOP_DYN_DIR/mex/build/matlab/mjdgges/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.4
cp $TOP_DYN_DIR/mex/build/matlab/ms_sbvar/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.4
cp $TOP_DYN_DIR/mex/build/matlab/block_kalman_filter/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.4
cp $TOP_DYN_DIR/mex/build/matlab/bytecode/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.4
cp $TOP_DYN_DIR/mex/build/matlab/dynare_simul_/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.4
cp $TOP_DYN_DIR/mex/build/matlab/gensylv/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.4
cp $TOP_DYN_DIR/mex/build/matlab/k_order_perturbation/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.4
cp $TOP_DYN_DIR/mex/build/matlab/kalman_steady_state/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.4
cp $TOP_DYN_DIR/mex/build/matlab/kronecker/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.4
cp $TOP_DYN_DIR/mex/build/matlab/local_state_space_iterations/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.4
cp $TOP_DYN_DIR/mex/build/matlab/mjdgges/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.4
cp $TOP_DYN_DIR/mex/build/matlab/ms_sbvar/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.4
cp $TOP_DYN_DIR/mex/build/matlab/sobol/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.4
# Octave
cp $TOP_DYN_DIR/mex/build/octave/block_kalman_filter/*.mex $INSTALLDIR/mex/octave
cp $TOP_DYN_DIR/mex/build/octave/bytecode/*.mex $INSTALLDIR/mex/octave
cp $TOP_DYN_DIR/mex/build/octave/dynare_simul_/*.mex $INSTALLDIR/mex/octave
cp $TOP_DYN_DIR/mex/build/octave/estimation/*.mex $INSTALLDIR/mex/octave
cp $TOP_DYN_DIR/mex/build/octave/gensylv/*.mex $INSTALLDIR/mex/octave
cp $TOP_DYN_DIR/mex/build/octave/k_order_perturbation/*.mex $INSTALLDIR/mex/octave
cp $TOP_DYN_DIR/mex/build/octave/kalman_steady_state/*.mex $INSTALLDIR/mex/octave
cp $TOP_DYN_DIR/mex/build/octave/kronecker/*.mex $INSTALLDIR/mex/octave
cp $TOP_DYN_DIR/mex/build/octave/mjdgges/*.mex $INSTALLDIR/mex/octave
cp $TOP_DYN_DIR/mex/build/octave/ms_sbvar/*.mex $INSTALLDIR/mex/octave
cp $TOP_DYN_DIR/mex/build/octave/ordschur/*.oct $INSTALLDIR/mex/octave
cp $TOP_DYN_DIR/mex/build/octave/qzcomplex/*.oct $INSTALLDIR/mex/octave
cp $TOP_DYN_DIR/mex/build/octave/block_kalman_filter/*.mex $INSTALLDIR/mex/octave
cp $TOP_DYN_DIR/mex/build/octave/bytecode/*.mex $INSTALLDIR/mex/octave
cp $TOP_DYN_DIR/mex/build/octave/dynare_simul_/*.mex $INSTALLDIR/mex/octave
cp $TOP_DYN_DIR/mex/build/octave/gensylv/*.mex $INSTALLDIR/mex/octave
cp $TOP_DYN_DIR/mex/build/octave/k_order_perturbation/*.mex $INSTALLDIR/mex/octave
cp $TOP_DYN_DIR/mex/build/octave/kalman_steady_state/*.mex $INSTALLDIR/mex/octave
cp $TOP_DYN_DIR/mex/build/octave/kronecker/*.mex $INSTALLDIR/mex/octave
cp $TOP_DYN_DIR/mex/build/octave/local_state_space_iterations/*.mex $INSTALLDIR/mex/octave
cp $TOP_DYN_DIR/mex/build/octave/mjdgges/*.mex $INSTALLDIR/mex/octave
cp $TOP_DYN_DIR/mex/build/octave/ms_sbvar/*.mex $INSTALLDIR/mex/octave
cp $TOP_DYN_DIR/mex/build/octave/ordschur/*.oct $INSTALLDIR/mex/octave
cp $TOP_DYN_DIR/mex/build/octave/qzcomplex/*.oct $INSTALLDIR/mex/octave
cp $TOP_DYN_DIR/mex/build/octave/sobol/*.mex $INSTALLDIR/mex/octave
# dynare++
cp $TOP_DYN_DIR/dynare++/src/dynare++ $INSTALLDIR/dynare++
cp $TOP_DYN_DIR/dynare++/extern/matlab/dynare_simul.m $INSTALLDIR/dynare++
cp $TOP_DYN_DIR/dynare++/src/dynare++ $INSTALLDIR/dynare++
cp $TOP_DYN_DIR/dynare++/extern/matlab/dynare_simul.m $INSTALLDIR/dynare++
# doc
cp $TOP_DYN_DIR/doc/bvar-a-la-sims.pdf $INSTALLDIR/doc
cp $TOP_DYN_DIR/doc/dr.pdf $INSTALLDIR/doc
cp $TOP_DYN_DIR/doc/dynare.pdf $INSTALLDIR/doc
cp $TOP_DYN_DIR/doc/guide.pdf $INSTALLDIR/doc
cp $TOP_DYN_DIR/doc/macroprocessor/macroprocessor.pdf $INSTALLDIR/doc
cp $TOP_DYN_DIR/doc/parallel/parallel.pdf $INSTALLDIR/doc
cp $TOP_DYN_DIR/doc/preprocessor/preprocessor.pdf $INSTALLDIR/doc
cp $TOP_DYN_DIR/doc/userguide/UserGuide.pdf $INSTALLDIR/doc
cp $TOP_DYN_DIR/doc/bvar-a-la-sims.pdf $INSTALLDIR/doc
cp $TOP_DYN_DIR/doc/dr.pdf $INSTALLDIR/doc
cp $TOP_DYN_DIR/doc/dynare.pdf $INSTALLDIR/doc
cp $TOP_DYN_DIR/doc/guide.pdf $INSTALLDIR/doc
cp $TOP_DYN_DIR/doc/macroprocessor/macroprocessor.pdf $INSTALLDIR/doc
cp $TOP_DYN_DIR/doc/parallel/parallel.pdf $INSTALLDIR/doc
cp $TOP_DYN_DIR/doc/preprocessor/preprocessor.pdf $INSTALLDIR/doc
cp $TOP_DYN_DIR/doc/userguide/UserGuide.pdf $INSTALLDIR/doc
cp $TOP_DYN_DIR/doc/gsa/gsa.pdf $INSTALLDIR/doc
# doc (dynare++)
cp $TOP_DYN_DIR/dynare++/doc/dynare++-tutorial.pdf $INSTALLDIR/doc/dynare++
cp $TOP_DYN_DIR/dynare++/doc/dynare++-ramsey.pdf $INSTALLDIR/doc/dynare++
cp $TOP_DYN_DIR/dynare++/sylv/sylvester.pdf $INSTALLDIR/doc/dynare++
cp $TOP_DYN_DIR/dynare++/tl/cc/tl.pdf $INSTALLDIR/doc/dynare++
cp $TOP_DYN_DIR/dynare++/integ/cc/integ.pdf $INSTALLDIR/doc/dynare++
cp $TOP_DYN_DIR/dynare++/kord/kord.pdf $INSTALLDIR/doc/dynare++
cp $TOP_DYN_DIR/dynare++/doc/dynare++-tutorial.pdf $INSTALLDIR/doc/dynare++
cp $TOP_DYN_DIR/dynare++/doc/dynare++-ramsey.pdf $INSTALLDIR/doc/dynare++
cp $TOP_DYN_DIR/dynare++/sylv/sylvester.pdf $INSTALLDIR/doc/dynare++
cp $TOP_DYN_DIR/dynare++/tl/cc/tl.pdf $INSTALLDIR/doc/dynare++
cp $TOP_DYN_DIR/dynare++/integ/cc/integ.pdf $INSTALLDIR/doc/dynare++
cp $TOP_DYN_DIR/dynare++/kord/kord.pdf $INSTALLDIR/doc/dynare++
##############################################
@ -117,16 +122,17 @@ cd $TOP_DYN_DIR/mex/build/matlab
make
# Matlab
cp $TOP_DYN_DIR/mex/build/matlab/block_kalman_filter/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.5-7.13
cp $TOP_DYN_DIR/mex/build/matlab/bytecode/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.5-7.13
cp $TOP_DYN_DIR/mex/build/matlab/dynare_simul_/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.5-7.13
cp $TOP_DYN_DIR/mex/build/matlab/estimation/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.5-7.13
cp $TOP_DYN_DIR/mex/build/matlab/gensylv/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.5-7.13
cp $TOP_DYN_DIR/mex/build/matlab/k_order_perturbation/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.5-7.13
cp $TOP_DYN_DIR/mex/build/matlab/kalman_steady_state/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.5-7.13
cp $TOP_DYN_DIR/mex/build/matlab/kronecker/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.5-7.13
cp $TOP_DYN_DIR/mex/build/matlab/mjdgges/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.5-7.13
cp $TOP_DYN_DIR/mex/build/matlab/ms_sbvar/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.5-7.13
cp $TOP_DYN_DIR/mex/build/matlab/block_kalman_filter/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.5-7.14
cp $TOP_DYN_DIR/mex/build/matlab/bytecode/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.5-7.14
cp $TOP_DYN_DIR/mex/build/matlab/dynare_simul_/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.5-7.14
cp $TOP_DYN_DIR/mex/build/matlab/gensylv/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.5-7.14
cp $TOP_DYN_DIR/mex/build/matlab/k_order_perturbation/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.5-7.14
cp $TOP_DYN_DIR/mex/build/matlab/kalman_steady_state/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.5-7.14
cp $TOP_DYN_DIR/mex/build/matlab/kronecker/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.5-7.14
cp $TOP_DYN_DIR/mex/build/matlab/local_state_space_iterations/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.5-7.14
cp $TOP_DYN_DIR/mex/build/matlab/mjdgges/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.5-7.14
cp $TOP_DYN_DIR/mex/build/matlab/ms_sbvar/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.5-7.14
cp $TOP_DYN_DIR/mex/build/matlab/sobol/*.mexmaci $INSTALLDIR/mex/matlab/osx32-7.5-7.14
#####################################
@ -138,16 +144,17 @@ cd $TOP_DYN_DIR/mex/build/matlab
make
# Matlab
cp $TOP_DYN_DIR/mex/build/matlab/block_kalman_filter/*.mexmaci64 $INSTALLDIR/mex/matlab/osx64
cp $TOP_DYN_DIR/mex/build/matlab/bytecode/*.mexmaci64 $INSTALLDIR/mex/matlab/osx64
cp $TOP_DYN_DIR/mex/build/matlab/dynare_simul_/*.mexmaci64 $INSTALLDIR/mex/matlab/osx64
cp $TOP_DYN_DIR/mex/build/matlab/estimation/*.mexmaci64 $INSTALLDIR/mex/matlab/osx64
cp $TOP_DYN_DIR/mex/build/matlab/gensylv/*.mexmaci64 $INSTALLDIR/mex/matlab/osx64
cp $TOP_DYN_DIR/mex/build/matlab/k_order_perturbation/*.mexmaci64 $INSTALLDIR/mex/matlab/osx64
cp $TOP_DYN_DIR/mex/build/matlab/kalman_steady_state/*.mexmaci64 $INSTALLDIR/mex/matlab/osx64
cp $TOP_DYN_DIR/mex/build/matlab/kronecker/*.mexmaci64 $INSTALLDIR/mex/matlab/osx64
cp $TOP_DYN_DIR/mex/build/matlab/mjdgges/*.mexmaci64 $INSTALLDIR/mex/matlab/osx64
cp $TOP_DYN_DIR/mex/build/matlab/ms_sbvar/*.mexmaci64 $INSTALLDIR/mex/matlab/osx64
cp $TOP_DYN_DIR/mex/build/matlab/block_kalman_filter/*.mexmaci64 $INSTALLDIR/mex/matlab/osx64
cp $TOP_DYN_DIR/mex/build/matlab/bytecode/*.mexmaci64 $INSTALLDIR/mex/matlab/osx64
cp $TOP_DYN_DIR/mex/build/matlab/dynare_simul_/*.mexmaci64 $INSTALLDIR/mex/matlab/osx64
cp $TOP_DYN_DIR/mex/build/matlab/gensylv/*.mexmaci64 $INSTALLDIR/mex/matlab/osx64
cp $TOP_DYN_DIR/mex/build/matlab/k_order_perturbation/*.mexmaci64 $INSTALLDIR/mex/matlab/osx64
cp $TOP_DYN_DIR/mex/build/matlab/kalman_steady_state/*.mexmaci64 $INSTALLDIR/mex/matlab/osx64
cp $TOP_DYN_DIR/mex/build/matlab/kronecker/*.mexmaci64 $INSTALLDIR/mex/matlab/osx64
cp $TOP_DYN_DIR/mex/build/matlab/local_state_space_iterations/*.mexmaci64 $INSTALLDIR/mex/matlab/osx64
cp $TOP_DYN_DIR/mex/build/matlab/mjdgges/*.mexmaci64 $INSTALLDIR/mex/matlab/osx64
cp $TOP_DYN_DIR/mex/build/matlab/ms_sbvar/*.mexmaci64 $INSTALLDIR/mex/matlab/osx64
cp $TOP_DYN_DIR/mex/build/matlab/sobol/*.mexmaci64 $INSTALLDIR/mex/matlab/osx64
# clean everything
cd $TOP_DYN_DIR
@ -157,8 +164,9 @@ make distclean
cd $INSTALLDIR
find . -name *.DS_Store -type f -exec rm {} \;
# adjust permissions
cd $TOP_DIR
# Change permissions
chmod -R g+w $INSTALLDIR
echo "DONE :)"
echo DONE
# NEED TO BUILD DYNARE.HTML DOCUMENTION ON DEBIAN
# AND INCLUDE IN DISTRIBUTION BY HAND