Annotation of OpenXM/src/asir-port/asir-port.sh, Revision 1.5
1.1 takayama 1: #!/bin/sh
1.5 ! takayama 2: # $OpenXM: OpenXM/src/asir-port/asir-port.sh,v 1.4 2004/02/27 00:12:22 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.2 takayama 17: asir="ftp://ftp.math.kobe-u.ac.jp/pub/asir/knoppix/asir-$os-$md.gz"
18: asirnamegunzip="asir-$os-$md"
19: asirname="asir-$os-$md.gz"
20: asirlib="ftp://ftp.math.kobe-u.ac.jp/pub/asir/knoppix/asirlib-$os-$libmd.tar.gz"
21: asirlibname="asirlib-$os-$libmd.tar.gz"
1.4 takayama 22: ot="ftp://ftp.math.kobe-u.ac.jp/pub/asir/knoppix/ox-texmacs-$os.tar.gz"
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:
54: # If there is un usb memory, then download under the usb memory.
55: if [ -d /mnt/sda1/.asir-tmp ] ; then
56: rm -f $HOME/.asir-tmp ; \
57: ln -s /mnt/sda1/.asir-tmp $HOME/.asir-tmp
58: fi
59: if [ -d /mnt/sdb1/.asir-tmp ] ; then
60: rm -f $HOME/.asir-tmp ; \
61: ln -s /mnt/sdb1/.asir-tmp $HOME/.asir-tmp
62: fi
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:
91:
1.2 takayama 92: $OpenXM_HOME/bin/fep $OpenXM_HOME/bin/asir $*
1.1 takayama 93:
94:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>