#/bin/sh # from cvs update to alpha on ftp site for linux, mswin, and mac osx # usage:sh mkalpha.sh # sh mkalpah.sh force # with force, will continue even if an ftp distribution file matches the # cvs updated version number NSRC=$HOME/neuron/nrn cd $NSRC lastalpha="`sh nrnversion.sh commit`" cvs update mtype="`sh config.guess | sed 's/^\([^-]*\)-\([^-]*\)-\([A-Za-z]*\).*/\3/'`" ver="`sh nrnversion.sh 2`" a=1 old="`ssh hines@www.neuron.yale.edu 'cd /home/ftp/neuron/versions/alpha; ls *'$ver'*'`" case "$mtype" in cygwin) echo "$old" |grep 'setup' ; a=$? ;; linux) echo "$old" |grep 'i686' ; a=$? ;; darwin) dminor="`uname -r | sed 's/\..*//'`" if test $dminor -eq 8 ; then osxminor=4 else osxminor=3 fi echo "$old" |grep "OSX10\.$osxminor" ; a=$? ;; esac if test "$a" = "0" ; then echo "up to date" if test "$1" != "force" ; then exit 0 fi fi currentalpha="`sh nrnversion.sh commit`" echo "$old" echo "$mtype old="$lastalpha" new=$currentalpha" ./build.sh NVER="`sh nrnversion.sh`" #mswin if test "$mtype" = "cygwin" ; then ./configure --prefix=`pwd` -with-nrnjava make if test $? != 0 ; then echo "make failed" exit 1 fi newver=`src/nrniv/nrniv --version | sed 's/.*(\([0-9]*\).*/\1/'` if "$newver" != "$currentalpha" ; then exit 1 fi make mswin make alphadist fi #linux if test "$mtype" = "linux" ; then NOBJ=$HOME/neuron/nrnrpm cd $NOBJ $NSRC/configure --prefix=/usr/local/nrn --with-iv=/usr/local/iv \ --srcdir=$NSRC --enable-rpm-rules --with-nrnjava --disable-static make if test $? != 0 ; then echo "make failed" exit 1 fi newver=`src/nrniv/nrniv --version | sed 's/.*(\([0-9]*\).*/\1/'` if "$newver" != "$currentalpha" ; then exit 1 fi make dist make alphadist sudo $HOME/bin/make_install_rpm # make install; make rpm make rpmdist fi #mac os x if test "$mtype" = "darwin" ; then NOBJ=$HOME/neuron/nrncarbon IDIR=/Applications/NEURON-$NVER cd $NOBJ $NSRC/configure --prefix=$IDIR/nrn --srcdir=$NSRC \ --with-iv=$IDIR/iv --with-nrnjava --enable-carbon make if test $? != 0 ; then echo "make failed" exit 1 fi make install make after_install newver=`$IDIR/nrn/powerpc/bin/nrniv --version | sed 's/.*(\([0-9]*\).*/\1/'` if test "$newver" != "$currentalpha" ; then exit 1 fi make dmg make "osxminor=$osxminor" alphadist fi