Debian Codegraph @

m4/matho-install-degrees

raw
1 #!/bin/sh
2 # This shell script installs m4 Mathomatic with trig functions that use degree units.
3 # If this is a source distribution, you should change directory to its root,
4 # and compile Mathomatic and "sudo make m4install-degrees" to install everything.
5 # If this is a binary distribution, you should type "sudo ./matho-install-degrees"
6 # from this directory to install the program files and man pages.
7
8 PREFIX=/usr/local
9 BINDIR=$PREFIX/bin
10 MANDIR=$PREFIX/share/man/man1
11 MAN1="mathomatic.1 rmath.1"
12 MATHOMATIC=mathomatic
13 if [ ! -x "$MATHOMATIC" ]
14 then
15 MATHOMATIC="../$MATHOMATIC"
16 fi
17 if [ ! -x "$MATHOMATIC" ]
18 then
19 echo mathomatic executable not found.
20 exit
21 fi
22
23 echo Installing "$MATHOMATIC" to "$BINDIR"
24 set -x
25 mkdir -p $BINDIR
26 mkdir -p $MANDIR
27 cp $MAN1 $MANDIR
28 ln -sf $MANDIR/rmath.1 $MANDIR/matho.1
29 cp "$MATHOMATIC" functions.m4 matho rmath "$BINDIR" &&
30 cat degrees.m4 >>"$BINDIR"/functions.m4 && echo Done! && exit
31 echo
32 echo Usage: sudo $0