Last change
on this file since 398 was 372, checked in by vor010, 20 years ago |
with a root-directory Makefile
|
-
Property svn:eol-style
set to
native
-
Property svn:executable
set to
*
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
1.6 KB
|
Line | |
---|
1 | #!/bin/sh
|
---|
2 |
|
---|
3 | ########################################
|
---|
4 | # #
|
---|
5 | # Install the asap python module #
|
---|
6 | # #
|
---|
7 | ########################################
|
---|
8 |
|
---|
9 | # temporary check to allow the same file for Narrabri and Epping
|
---|
10 | if [ x"$NARRABRI_ASAP" = xyes ];
|
---|
11 | then
|
---|
12 | ASAPDIR='/DATA/KAPUTAR_2/vor010/ASAP/site-packages/asap'
|
---|
13 | SRCDIR='/DATA/KAPUTAR_2/vor010/ASAP/asap'
|
---|
14 | else
|
---|
15 | ASAPDIR='/usr/local/lib/python2.3/site-packages/asap'
|
---|
16 | SRCDIR='/u/mar637/brage/singledish/asap'
|
---|
17 | fi
|
---|
18 | #
|
---|
19 |
|
---|
20 | # check to allow setup via command line parameters
|
---|
21 | if [ x"$1" != x ];
|
---|
22 | then
|
---|
23 | ASAPDIR=$1
|
---|
24 | echo "ASAP will be installed into "$ASAPDIR
|
---|
25 | fi
|
---|
26 |
|
---|
27 | if [ x"$2" != x ];
|
---|
28 | then
|
---|
29 | SRCDIR=$2
|
---|
30 | echo "from "$SRCDIR
|
---|
31 | fi
|
---|
32 |
|
---|
33 | # where the source python files are
|
---|
34 | pydir='python'
|
---|
35 | # where the library modules is
|
---|
36 | libdir='lib'
|
---|
37 | # the python files to install
|
---|
38 | srcfiles="__init__.py asapmath.py scantable.py asapreader.py asaplot.py asapfitter.py asapplotter.py asaplinefind.py"
|
---|
39 | # the libraries to install
|
---|
40 | libfiles='_asap.so'
|
---|
41 |
|
---|
42 | #if [ -d ${SHAREDIR} ] ; then
|
---|
43 | # echo "ASAP share dir already exists."
|
---|
44 | #else
|
---|
45 | # mkdir ${SHAREDIR}
|
---|
46 | #fi
|
---|
47 |
|
---|
48 | # go to src dir
|
---|
49 | if [ -d ${SRCDIR} ] ; then
|
---|
50 | cd ${SRCDIR}
|
---|
51 | else
|
---|
52 | echo "No source directory found."
|
---|
53 | exit 0
|
---|
54 | fi
|
---|
55 |
|
---|
56 | # check if the site-packes directory exists and create if necessary
|
---|
57 | if [ -d ${ASAPDIR} ] ; then
|
---|
58 | echo "Using existing asap module dir."
|
---|
59 | else
|
---|
60 | mkdir ${ASAPDIR}
|
---|
61 | fi
|
---|
62 |
|
---|
63 | # install asap files
|
---|
64 | for f in ${srcfiles}
|
---|
65 | do
|
---|
66 | cp -f ${SRCDIR}/${pydir}/${f} ${ASAPDIR}/
|
---|
67 | done
|
---|
68 |
|
---|
69 | for f in ${libfiles}
|
---|
70 | do
|
---|
71 | cp -f ${SRCDIR}/${libdir}/${f} ${ASAPDIR}/
|
---|
72 | done
|
---|
73 | chmod -R g+w ${ASAPDIR}
|
---|
74 | echo "Successfully installed the asap module into ${ASAPDIR}"
|
---|
75 |
|
---|
76 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.