Annotation of OpenXM/src/asir-port/asir-port.sh, Revision 1.3
1.1 takayama 1: #!/bin/sh
1.3 ! takayama 2: # $OpenXM: OpenXM/src/asir-port/asir-port.sh,v 1.2 2004/02/22 06:39:09 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"
22:
23: if [ $# = 1 ]; then
24: if [ $1 = "--install" ]; then
25: rm -rf $HOME/.asir-tmp
26: fi
27: fi
1.1 takayama 28:
29: _agree() {
30: echo "------------------------------------------------------------------"
31: echo "Risa/Asir is distributed with no warranty for non-commercial use."
1.2 takayama 32: echo "OpenXM subcomponents are distributed with no warranty under BSD license or GPL."
33: echo "Do you agree with the licenses under $OpenXM_HOME/Copyright?"
1.1 takayama 34: echo "------------------------------------------------------------------"
1.2 takayama 35: echo "y: agree, n: do not agree, v: read the detail of the asir license."
1.1 takayama 36: read -e -p "(y/n/v)" ans
37: if [ $ans = "y" ]; then
38: return
39: fi
40: if [ $ans = "n" ]; then
41: echo "Aborting the installation." ; \
42: exit
43: fi
44: if [ $ans = "v" ]; then
45: more $OpenXM_HOME/Copyright/Copyright.asir ; \
46: _agree ; \
47: return
48: fi
49: _agree
50: }
1.3 ! takayama 51:
! 52: # If there is un usb memory, then download under the usb memory.
! 53: if [ -d /mnt/sda1/.asir-tmp ] ; then
! 54: rm -f $HOME/.asir-tmp ; \
! 55: ln -s /mnt/sda1/.asir-tmp $HOME/.asir-tmp
! 56: fi
! 57: if [ -d /mnt/sdb1/.asir-tmp ] ; then
! 58: rm -f $HOME/.asir-tmp ; \
! 59: ln -s /mnt/sdb1/.asir-tmp $HOME/.asir-tmp
! 60: fi
1.1 takayama 61:
1.2 takayama 62: if [ ! -f $HOME/.asir-tmp/$asirnamegunzip ]; then
1.1 takayama 63: _agree ; \
1.2 takayama 64: echo -n "Downloading the binary of asir (1.5M) $asir ... " ; \
1.1 takayama 65: oxfetch.sh $asir $HOME/.asir-tmp ; \
1.2 takayama 66: echo "Done." ; \
67: gunzip $HOME/.asir-tmp/$asirname ; \
68: chmod +x $HOME/.asir-tmp/$asirnamegunzip ; \
69: rm -f $HOME/.asir-tmp/asir ; \
70: ln -s $HOME/.asir-tmp/$asirnamegunzip $HOME/.asir-tmp/asir ; \
71: fi
72: if [ ! -f $HOME/.asir-tmp/$asirlibname ]; then
73: echo -n "Downloading the asir library $asirlib... " ; \
74: oxfetch.sh $asirlib $HOME/.asir-tmp ; \
75: echo "Done." ; \
76: (cd $HOME/.asir-tmp ; tar xzf $asirlibname) ; \
1.1 takayama 77: fi
78:
79:
1.2 takayama 80: $OpenXM_HOME/bin/fep $OpenXM_HOME/bin/asir $*
1.1 takayama 81:
82:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>