[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.7

1.1       takayama    1: #!/bin/sh
1.7     ! takayama    2: # $OpenXM: OpenXM/src/asir-port/asir-install.sh,v 1.6 2005/04/20 22:24:39 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: #
                     13: echo $HOME
1.1       takayama   14: os=`uname -s`
                     15: md=`cat $OpenXM_HOME/lib/asir/distinfo-asir`
                     16: libmd=`cat $OpenXM_HOME/lib/asir/distinfo-lib`
                     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.7     ! takayama   23: asir="ftp://ftp.math.kobe-u.ac.jp/pub/asir/knoppix-all/knoppix-2006-02/asir-$os-$md.gz"
1.1       takayama   24: asirnamegunzip="asir-$os-$md"
                     25: asirname="asir-$os-$md.gz"
1.7     ! takayama   26: asirlib="ftp://ftp.math.kobe-u.ac.jp/pub/asir/knoppix-all/knoppix-2006-02/asirlib-$os-$libmd.tar.gz"
1.1       takayama   27: asirlibname="asirlib-$os-$libmd.tar.gz"
1.7     ! takayama   28: ot="ftp://ftp.math.kobe-u.ac.jp/pub/asir/knoppix-all/knoppix-2006-02/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 ; \
                     84:        install -m 755 $HOME/.asir-tmp/$asirnamegunzip $OpenXM_HOME/bin/asir ; \
                     85: fi
                     86: if [ ! -f $HOME/.asir-tmp/$asirlibname ]; then
                     87:        echo -n "Downloading the asir library  $asirlib... " ; \
                     88:        oxfetch.sh $asirlib $HOME/.asir-tmp ; \
                     89:        echo "Done." ; \
                     90:        (cd $HOME/.asir-tmp ; tar xzf $asirlibname) ; \
                     91:        (cd $OpenXM_HOME/lib/asir ; rm -f $ASIR_LIB_FILES) ; \
                     92:        (cd $HOME/.asir-tmp ; install -m 644 $ASIR_LIB_FILES $OpenXM_HOME/lib/asir) ; \
                     93: fi
                     94: if [ ! -f $HOME/.asir-tmp/$otname ]; then
                     95:        echo -n "Downloading the $ot plugin... " ; \
                     96:        oxfetch.sh $ot $HOME/.asir-tmp ; \
                     97:        echo "Done." ; \
1.2       takayama   98:        if [ -f $HOME/.TeXmacs/progs/my-init-texmacs.scm ]; then \
                     99:                echo "Warning .TeXmacs/progs/my-init-texmacs.scm exists"; \
                    100:                echo "Copy from ~/.asir-tmp/$otname by hand."; \
                    101:     else (cd $HOME ; tar xzf $HOME/.asir-tmp/$otname) ; \
                    102:     fi
1.1       takayama  103: fi
                    104:
1.3       takayama  105: _check_install_error
1.1       takayama  106:
                    107: echo "Installation is completed."
                    108:
                    109:
                    110:

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