[BACK]Return to asir-install.sh CVS log [TXT][DIR] Up to [local] / OpenXM / src / asir-port

Annotation of OpenXM/src/asir-port/asir-install.sh, Revision 1.9

1.1       takayama    1: #!/bin/sh
1.9     ! takayama    2: # $OpenXM: OpenXM/src/asir-port/asir-install.sh,v 1.8 2006/02/08 02:06:52 takayama Exp $
1.6       takayama    3: # Downloading Risa/Asir for FLL-free systems
                      4: # under $HOME/.asir-tmp and installs asir to $OpenXM_HOME/bin
1.5       takayama    5: #
                      6: # In the Debian package, /usr/local/OpenXM/bin/asir is the symbolic link to
                      7: # /home/knoppix/.asir-tmp/asir.
                      8: # So, on non-knoppix system, execute
1.6       takayama    9: # (export OpenXM_HOME=/usr/local/OpenXM; openxm asir-install.sh)
                     10: # as the root in the bash to install the asir under /usr/local/OpenXM/bin.
                     11: #  /root/.asir-tmp will be a work-directory in this case.
1.5       takayama   12: #
1.8       takayama   13: version=`cat $OpenXM_HOME/lib/version.txt`
1.1       takayama   14: os=`uname -s`
1.8       takayama   15: md=`cat $OpenXM_HOME/lib/asir/distinfo-asir.md5`
1.9     ! takayama   16: libmd=`cat $OpenXM_HOME/lib/asir/distinfo-asirlib.md5`
1.1       takayama   17: # For testing
                     18: #asir="ftp://ftp.math.kobe-u.ac.jp/pub/asir/gzip.exe"
                     19: #asirname="gzip.exe"
                     20: #asirlib="ftp://ftp.math.kobe-u.ac.jp/pub/asir/tar.exe"
                     21: #asirlibname="tar.exe"
                     22: #
1.8       takayama   23: asir="ftp://ftp.math.kobe-u.ac.jp/pub/OpenXM/head/knoppix/asir-$os-$version.gz"
                     24: asirnamegunzip="asir-$os-$version"
                     25: asirname="asir-$os-$version.gz"
                     26: asirlib="ftp://ftp.math.kobe-u.ac.jp/pub/OpenXM/head/knoppix/asirlib-$os-$version.tar.gz"
                     27: asirlibname="asirlib-$os-$version.tar.gz"
                     28: ot="ftp://ftp.math.kobe-u.ac.jp/pub/OpenXM/head/knoppix/ox-texmacs-$os.tar.gz"
1.1       takayama   29: otname="ox-texmacs-$os.tar.gz"
                     30:
1.3       takayama   31: ASIR_LIB_FILES="alph bfct bgk const cyclic defs.h dmul fctrdata fctrtest \
1.1       takayama   32:                fff gr ifplot katsura mat nf num primdec \
1.3       takayama   33:                ratint robot solve sp sturm xm"
                     34:
1.1       takayama   35:
                     36: if [ $# = 1 ]; then
                     37: if [ $1 = "--force" ]; then
                     38:  rm -rf $HOME/.asir-tmp
                     39: fi
                     40: fi
                     41:
                     42: _agree() {
                     43:        echo "------------------------------------------------------------------"
                     44:        echo "This script install Risa/Asir under $OpenXM_HOME"
                     45:        echo "Risa/Asir is distributed with no warranty for non-commercial use."
                     46:        echo "OpenXM subcomponents are distributed with no warranty under BSD license or GPL."
                     47:        echo "Do you agree with the licenses under $OpenXM_HOME/Copyright?"
                     48:        echo "------------------------------------------------------------------"
                     49:        echo "y: agree, n: do not agree, v: read the detail of the asir license."
                     50:        read -e -p "(y/n/v)" ans
                     51:        if [ $ans = "y" ]; then
                     52:                return
                     53:        fi
                     54:        if [ $ans = "n" ]; then
                     55:                echo "Aborting the installation." ; \
                     56:                exit
                     57:     fi
                     58:        if [ $ans = "v" ]; then
                     59:                more $OpenXM_HOME/Copyright/Copyright.asir ; \
                     60:                _agree ; \
                     61:                return
                     62:        fi
                     63:        _agree
                     64: }
                     65:
1.3       takayama   66: _check_install_error() {
                     67:   if [ ! -f $HOME/.asir-tmp/$asirnamegunzip ]; then
                     68:      echo "Installation of Risa/Asir from the network seems to be failed."; \
                     69:      echo "Please check if your computer is connected to the internet "; \
                     70:      echo "  and you can download files from ftp.math.kobe-u.ac.jp  "; \
                     71:      echo "  by passive ftp."; \
                     72:      sleep 60 ; \
                     73:      exit ; \
                     74:   fi
                     75: }
1.1       takayama   76:
                     77: if [ ! -f $HOME/.asir-tmp/$asirnamegunzip ]; then
                     78:        _agree ; \
                     79:        echo -n "Downloading the binary of asir (1.5M) $asir ... " ; \
                     80:        oxfetch.sh $asir $HOME/.asir-tmp ; \
                     81:        echo "Done." ; \
                     82:        gunzip $HOME/.asir-tmp/$asirname ; \
                     83:        chmod +x $HOME/.asir-tmp/$asirnamegunzip ; \
1.8       takayama   84:         rm -f $OpenXM_HOME/bin/asir ; \
1.1       takayama   85:        install -m 755 $HOME/.asir-tmp/$asirnamegunzip $OpenXM_HOME/bin/asir ; \
                     86: fi
                     87: if [ ! -f $HOME/.asir-tmp/$asirlibname ]; then
                     88:        echo -n "Downloading the asir library  $asirlib... " ; \
                     89:        oxfetch.sh $asirlib $HOME/.asir-tmp ; \
                     90:        echo "Done." ; \
                     91:        (cd $HOME/.asir-tmp ; tar xzf $asirlibname) ; \
                     92:        (cd $OpenXM_HOME/lib/asir ; rm -f $ASIR_LIB_FILES) ; \
                     93:        (cd $HOME/.asir-tmp ; install -m 644 $ASIR_LIB_FILES $OpenXM_HOME/lib/asir) ; \
                     94: fi
                     95: if [ ! -f $HOME/.asir-tmp/$otname ]; then
                     96:        echo -n "Downloading the $ot plugin... " ; \
                     97:        oxfetch.sh $ot $HOME/.asir-tmp ; \
                     98:        echo "Done." ; \
1.2       takayama   99:        if [ -f $HOME/.TeXmacs/progs/my-init-texmacs.scm ]; then \
                    100:                echo "Warning .TeXmacs/progs/my-init-texmacs.scm exists"; \
                    101:                echo "Copy from ~/.asir-tmp/$otname by hand."; \
                    102:     else (cd $HOME ; tar xzf $HOME/.asir-tmp/$otname) ; \
                    103:     fi
1.1       takayama  104: fi
                    105:
1.3       takayama  106: _check_install_error
1.1       takayama  107:
                    108: echo "Installation is completed."
                    109:
                    110:
                    111:

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>