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

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

1.1       takayama    1: #!/bin/sh
1.11    ! takayama    2: # $OpenXM: OpenXM/src/asir-port/asir-port.sh,v 1.10 2006/02/08 02:06:52 takayama Exp $
1.2       takayama    3: # Downloading Risa/Asir for FLL-free systems.
1.1       takayama    4: # Risa/Asir is installed under $HOME/.asir-tmp/$asirname
                      5: # Symbolic link to $asirname from $OpenXM_HOME/bin/asir must exist
1.2       takayama    6: # in the distribution of FLL-free distribution.
1.1       takayama    7: # Starting script of Risa/Asir may call this shell script.
1.10      takayama    8: version=`cat $OpenXM_HOME/lib/version.txt`
1.1       takayama    9: os=`uname -s`
1.10      takayama   10: md=`cat $OpenXM_HOME/lib/asir/distinfo-asir.md5`
1.11    ! takayama   11: libmd=`cat $OpenXM_HOME/lib/asir/distinfo-asirlib.md5`
1.1       takayama   12: # For testing
1.2       takayama   13: #asir="ftp://ftp.math.kobe-u.ac.jp/pub/asir/gzip.exe"
                     14: #asirname="gzip.exe"
                     15: #asirlib="ftp://ftp.math.kobe-u.ac.jp/pub/asir/tar.exe"
                     16: #asirlibname="tar.exe"
1.1       takayama   17: #
1.10      takayama   18: asir="ftp://ftp.math.kobe-u.ac.jp/pub/OpenXM/head/knoppix/asir-$os-$version.gz"
                     19: asirnamegunzip="asir-$os-$version"
                     20: asirname="asir-$os-$version.gz"
                     21: asirlib="ftp://ftp.math.kobe-u.ac.jp/pub/OpenXM/head/knoppix/asirlib-$os-$version.tar.gz"
                     22: asirlibname="asirlib-$os-$version.tar.gz"
                     23: ot="ftp://ftp.math.kobe-u.ac.jp/pub/OpenXM/head/knoppix/ox-texmacs-$os.tar.gz"
1.4       takayama   24: otname="ox-texmacs-$os.tar.gz"
1.2       takayama   25:
                     26: if [ $# = 1 ]; then
                     27: if [ $1 = "--install" ]; then
                     28:  rm -rf $HOME/.asir-tmp
                     29: fi
                     30: fi
1.1       takayama   31:
                     32: _agree() {
                     33:        echo "------------------------------------------------------------------"
                     34:        echo "Risa/Asir is distributed with no warranty for non-commercial use."
1.2       takayama   35:        echo "OpenXM subcomponents are distributed with no warranty under BSD license or GPL."
                     36:        echo "Do you agree with the licenses under $OpenXM_HOME/Copyright?"
1.1       takayama   37:        echo "------------------------------------------------------------------"
1.2       takayama   38:        echo "y: agree, n: do not agree, v: read the detail of the asir license."
1.1       takayama   39:        read -e -p "(y/n/v)" ans
                     40:        if [ $ans = "y" ]; then
                     41:                return
                     42:        fi
                     43:        if [ $ans = "n" ]; then
1.10      takayama   44:                echo "Aborting the installation of asir." ; \
1.1       takayama   45:                exit
                     46:     fi
                     47:        if [ $ans = "v" ]; then
                     48:                more $OpenXM_HOME/Copyright/Copyright.asir ; \
                     49:                _agree ; \
                     50:                return
                     51:        fi
                     52:        _agree
                     53: }
1.3       takayama   54:
1.7       takayama   55: _check_install_error() {
                     56:   if [ ! -f $HOME/.asir-tmp/$asirnamegunzip ]; then
                     57:      echo "Installation of Risa/Asir from the network seems to be failed."; \
                     58:      echo "Please check if your computer is connected to the internet "; \
                     59:      echo "  and you can download files from ftp.math.kobe-u.ac.jp  "; \
                     60:      echo "  by passive ftp."; \
                     61:      sleep 60 ; \
                     62:   fi
                     63: }
1.1       takayama   64:
1.2       takayama   65: if [ ! -f $HOME/.asir-tmp/$asirnamegunzip ]; then
1.1       takayama   66:        _agree ; \
1.2       takayama   67:        echo -n "Downloading the binary of asir (1.5M) $asir ... " ; \
1.1       takayama   68:        oxfetch.sh $asir $HOME/.asir-tmp ; \
1.2       takayama   69:        echo "Done." ; \
                     70:        gunzip $HOME/.asir-tmp/$asirname ; \
                     71:        chmod +x $HOME/.asir-tmp/$asirnamegunzip ; \
                     72:        rm -f $HOME/.asir-tmp/asir ; \
                     73:        ln -s $HOME/.asir-tmp/$asirnamegunzip $HOME/.asir-tmp/asir ; \
                     74: fi
                     75: if [ ! -f $HOME/.asir-tmp/$asirlibname ]; then
                     76:        echo -n "Downloading the asir library  $asirlib... " ; \
                     77:        oxfetch.sh $asirlib $HOME/.asir-tmp ; \
                     78:        echo "Done." ; \
                     79:        (cd $HOME/.asir-tmp ; tar xzf $asirlibname) ; \
1.4       takayama   80: fi
                     81: if [ ! -f $HOME/.asir-tmp/$otname ]; then
                     82:        echo -n "Downloading $ot plugin... " ; \
                     83:        oxfetch.sh $ot $HOME/.asir-tmp ; \
                     84:        echo "Done." ; \
1.5       takayama   85:        if [ -f $HOME/.TeXmacs/progs/my-init-texmacs.scm ]; then \
                     86:                echo "Warning .TeXmacs/progs/my-init-texmacs.scm exists"; \
                     87:                echo "Copy from ~/.asir-tmp/$otname by hand."; \
                     88:     else (cd $HOME ; tar xzf $HOME/.asir-tmp/$otname) ; \
                     89:     fi
1.1       takayama   90: fi
                     91:
1.7       takayama   92: _check_install_error
1.1       takayama   93:
1.2       takayama   94: $OpenXM_HOME/bin/fep $OpenXM_HOME/bin/asir $*
1.1       takayama   95:
                     96:

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