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