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

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

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