annotate octinst.sh.in @ 2720:d0b400de8b3f octave-forge

Include special casing of active nav-link, like for octave page (Soren want to change the colour scheme?)
author adb014
date Tue, 17 Oct 2006 22:54:51 +0000
parents 250c9ad7c68e
children 9df9c6d6c5a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
1 #! /bin/sh
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
2
1019
e860de7ad117 Add support for alternative functions.
tpikonen
parents: 937
diff changeset
3 # octinst.sh source mpath opath xpath [altmpath altopath]
0
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
4
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
5 # Copies all m-files and oct-files from the source directory to the
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
6 # mpath and opath respectively. Preserves links. Files in
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
7 # source/data are copied to mpath. Files in the source/bin are copied
1019
e860de7ad117 Add support for alternative functions.
tpikonen
parents: 937
diff changeset
8 # to xpath. m-files and oct-files in source/alternatives are copied to
e860de7ad117 Add support for alternative functions.
tpikonen
parents: 937
diff changeset
9 # altmpath and altopath respectively
0
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
10
1019
e860de7ad117 Add support for alternative functions.
tpikonen
parents: 937
diff changeset
11 if test $# -lt 4 ; then
0
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
12 echo 'Not enough arguments'
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
13 exit 1
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
14 fi
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
15
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
16 # interpret input parameters
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
17 source=$1; shift
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
18 mpath=$1; shift
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
19 opath=$1; shift
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
20 xpath=$1; shift
1304
2e8272f0e514 (for David Billinghurst) avoid bashisms: in sh, shift fails if no more args
pkienzle
parents: 1063
diff changeset
21 if test $# -ge 1; then altmpath=$1; shift; fi
2e8272f0e514 (for David Billinghurst) avoid bashisms: in sh, shift fails if no more args
pkienzle
parents: 1063
diff changeset
22 if test $# -ge 1; then altopath=$1; shift; fi
0
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
23 INSTALL="@INSTALL@"
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
24 INSTALL_DATA="@INSTALL_DATA@"
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
25 INSTALL_PROGRAM="@INSTALL_PROGRAM@"
1720
b4586377f0a6 [for Dan McMahill] use INSTALL_SCRIPT for scripts
pkienzle
parents: 1304
diff changeset
26 INSTALL_SCRIPT="@INSTALL_SCRIPT@"
848
c7db2c52c5d1 [David Bateman] Build and install the PKG_ADD files. {Modified by PAK without
pkienzle
parents: 106
diff changeset
27 MKPKGADD="@TOPDIR@/admin/mkpkgadd"
937
95178cedbc08 Use COPY_FLAGS to set options for cp when installing .oct files.
persquare
parents: 856
diff changeset
28 COPY_FLAGS="@COPY_FLAGS@"
0
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
29
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
30 # grab the m-files
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
31 files=`echo $source/*.m`
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
32 if test "$files" != "$source/*.m" ; then
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
33 $INSTALL -d $mpath
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
34 $INSTALL_DATA $files $mpath
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
35 fi
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
36
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
37 # grab the oct-files
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
38 files=`echo $source/*.oct`
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
39 if test "$files" != "$source/*.oct" ; then
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
40 $INSTALL -d $opath
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
41 ## Grrr... install doesn't preserve links. Hope this works.
937
95178cedbc08 Use COPY_FLAGS to set options for cp when installing .oct files.
persquare
parents: 856
diff changeset
42 cp $COPY_FLAGS $files $opath
0
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
43 fi
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
44
1019
e860de7ad117 Add support for alternative functions.
tpikonen
parents: 937
diff changeset
45 # install alternatives
e860de7ad117 Add support for alternative functions.
tpikonen
parents: 937
diff changeset
46 if test -d "$source/alternatives" ; then
e860de7ad117 Add support for alternative functions.
tpikonen
parents: 937
diff changeset
47 # m-files
e860de7ad117 Add support for alternative functions.
tpikonen
parents: 937
diff changeset
48 files=`echo $source/alternatives/*.m`
e860de7ad117 Add support for alternative functions.
tpikonen
parents: 937
diff changeset
49 if test "$files" != "$source/alternatives/*.m" ; then
e860de7ad117 Add support for alternative functions.
tpikonen
parents: 937
diff changeset
50 $INSTALL -d $altmpath
e860de7ad117 Add support for alternative functions.
tpikonen
parents: 937
diff changeset
51 $INSTALL_DATA $files $altmpath
e860de7ad117 Add support for alternative functions.
tpikonen
parents: 937
diff changeset
52 fi
e860de7ad117 Add support for alternative functions.
tpikonen
parents: 937
diff changeset
53 # oct-files
e860de7ad117 Add support for alternative functions.
tpikonen
parents: 937
diff changeset
54 files=`echo $source/alternatives/*.oct`
e860de7ad117 Add support for alternative functions.
tpikonen
parents: 937
diff changeset
55 if test "$files" != "$source/alternatives/*.oct" ; then
e860de7ad117 Add support for alternative functions.
tpikonen
parents: 937
diff changeset
56 $INSTALL -d $altopath
e860de7ad117 Add support for alternative functions.
tpikonen
parents: 937
diff changeset
57 $INSTALL_DATA $files $altopath
e860de7ad117 Add support for alternative functions.
tpikonen
parents: 937
diff changeset
58 fi
e860de7ad117 Add support for alternative functions.
tpikonen
parents: 937
diff changeset
59 fi
e860de7ad117 Add support for alternative functions.
tpikonen
parents: 937
diff changeset
60
1893
250c9ad7c68e Clean up install so that it is quiet unless there is a problem and so that
pkienzle
parents: 1720
diff changeset
61 # Create PKG_ADD, and destroy it immediately if it is empty
250c9ad7c68e Clean up install so that it is quiet unless there is a problem and so that
pkienzle
parents: 1720
diff changeset
62 # XXX FIXME XXX no PKG_ADD created if only oct-files and no m-files.
250c9ad7c68e Clean up install so that it is quiet unless there is a problem and so that
pkienzle
parents: 1720
diff changeset
63 if test -d "$mpath" ; then
250c9ad7c68e Clean up install so that it is quiet unless there is a problem and so that
pkienzle
parents: 1720
diff changeset
64 $MKPKGADD $source > $mpath/PKG_ADD
250c9ad7c68e Clean up install so that it is quiet unless there is a problem and so that
pkienzle
parents: 1720
diff changeset
65 if test -z "`cat $mpath/PKG_ADD`" ; then rm -f $mpath/PKG_ADD; fi
848
c7db2c52c5d1 [David Bateman] Build and install the PKG_ADD files. {Modified by PAK without
pkienzle
parents: 106
diff changeset
66 fi
1063
763f8995ad93 Create PKG_ADD for */alternatives -directories
tpikonen
parents: 1019
diff changeset
67 # PKG_ADD for alternatives
1893
250c9ad7c68e Clean up install so that it is quiet unless there is a problem and so that
pkienzle
parents: 1720
diff changeset
68 if test -d "$source/alternatives" -a -d "$altmpath" ; then
250c9ad7c68e Clean up install so that it is quiet unless there is a problem and so that
pkienzle
parents: 1720
diff changeset
69 $MKPKGADD $source/alternatives > $altmpath/PKG_ADD
250c9ad7c68e Clean up install so that it is quiet unless there is a problem and so that
pkienzle
parents: 1720
diff changeset
70 if test -z "`cat $altmpath/PKG_ADD`" ; then rm $altmpath/PKG_ADD; fi
1063
763f8995ad93 Create PKG_ADD for */alternatives -directories
tpikonen
parents: 1019
diff changeset
71 fi
848
c7db2c52c5d1 [David Bateman] Build and install the PKG_ADD files. {Modified by PAK without
pkienzle
parents: 106
diff changeset
72
106
918cc682e7be Allow ./configure; make; make install directly from the CVS tree
pkienzle
parents: 0
diff changeset
73 # grab the data files, skipping the CVS directory
918cc682e7be Allow ./configure; make; make install directly from the CVS tree
pkienzle
parents: 0
diff changeset
74 files=`echo $source/data/* | sed -e "s/[^ ]*CVS//"`
1893
250c9ad7c68e Clean up install so that it is quiet unless there is a problem and so that
pkienzle
parents: 1720
diff changeset
75 if test -n "$files" -a "$files" != "$source/data/*" ; then
0
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
76 $INSTALL -d $mpath
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
77 $INSTALL_DATA $files $mpath
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
78 fi
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
79
106
918cc682e7be Allow ./configure; make; make install directly from the CVS tree
pkienzle
parents: 0
diff changeset
80 # grab the executable files, skipping the CVS directory
918cc682e7be Allow ./configure; make; make install directly from the CVS tree
pkienzle
parents: 0
diff changeset
81 files=`echo $source/bin/* | sed -e "s/[^ ]*CVS//"`
1893
250c9ad7c68e Clean up install so that it is quiet unless there is a problem and so that
pkienzle
parents: 1720
diff changeset
82 if test -n "$files" -a "$files" != "$source/bin/*" ; then
0
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
83 $INSTALL -d $xpath
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
84 $INSTALL_PROGRAM $files $xpath
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
85 fi
6b33357c7561 Initial revision
pkienzle
parents:
diff changeset
86
1720
b4586377f0a6 [for Dan McMahill] use INSTALL_SCRIPT for scripts
pkienzle
parents: 1304
diff changeset
87 # grab the script files, skipping the CVS directory
b4586377f0a6 [for Dan McMahill] use INSTALL_SCRIPT for scripts
pkienzle
parents: 1304
diff changeset
88 files=`echo $source/scripts/* | sed -e "s/[^ ]*CVS//"`
1893
250c9ad7c68e Clean up install so that it is quiet unless there is a problem and so that
pkienzle
parents: 1720
diff changeset
89 if test -n "$files" -a "$files" != "$source/scripts/*" ; then
1720
b4586377f0a6 [for Dan McMahill] use INSTALL_SCRIPT for scripts
pkienzle
parents: 1304
diff changeset
90 $INSTALL -d $xpath
b4586377f0a6 [for Dan McMahill] use INSTALL_SCRIPT for scripts
pkienzle
parents: 1304
diff changeset
91 $INSTALL_SCRIPT $files $xpath
b4586377f0a6 [for Dan McMahill] use INSTALL_SCRIPT for scripts
pkienzle
parents: 1304
diff changeset
92 fi
b4586377f0a6 [for Dan McMahill] use INSTALL_SCRIPT for scripts
pkienzle
parents: 1304
diff changeset
93