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