source: trunk/bin/install.sh@ 524

Last change on this file since 524 was 516, checked in by vor010, 20 years ago

LineFinder/automatic baseline fitter: a bug related to multiple-row scantable handling has been corrected.
Help is changed to describe a new interface. Parameter checking + vector to tuple conversion for the edge parameter have been added

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.9 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
10if [ x"$NARRABRI_ASAP" = xyes ];
11then
12 ASAPDIR='/DATA/KAPUTAR_2/vor010/ASAP/site-packages/asap'
13 SRCDIR='/DATA/KAPUTAR_2/vor010/ASAP/asap'
14 BINDIR='/DATA/KAPUTAR_2/vor010/ASAP/executables'
15else
16 ASAPDIR='/usr/local/lib/python2.3/site-packages/asap'
17 SRCDIR='/u/mar637/asap'
18 BINDIR='/usr/local/bin'
19fi
20#
21# check to allow setup via command line parameters
22if [ x"$1" != x ];
23then
24 ASAPDIR=$1
25 echo "ASAP will be installed into "$ASAPDIR
26fi
27
28if [ x"$2" != x ];
29then
30 SRCDIR=$2
31 echo "from "$SRCDIR
32fi
33
34if [ x"$3" != x ];
35then
36 BINDIR=$3
37 echo "Executables go into $BINDIR"
38fi
39
40# where the source python files are
41pydir='python'
42# where the library modules is
43libdir='lib'
44bindir='bin'
45# the python files to install
46srcfiles="__init__.py asapmath.py scantable.py asapreader.py asaplot.py asapfitter.py asapplotter.py asaplinefind.py"
47
48# the libraries to install
49libfiles='_asap.so'
50binfiles='asap'
51
52#if [ -d ${SHAREDIR} ] ; then
53# echo "ASAP share dir already exists."
54#else
55# mkdir ${SHAREDIR}
56#fi
57
58# go to src dir
59if [ -d ${SRCDIR} ] ; then
60 cd ${SRCDIR}
61else
62 echo "No source directory found."
63 exit 0
64fi
65
66# check if the site-packes directory exists and create if necessary
67if [ -d ${ASAPDIR} ] ; then
68 echo "Using existing asap module dir."
69else
70 mkdir ${ASAPDIR}
71fi
72
73# install asap files
74for f in ${srcfiles}
75do
76 cp -f ${SRCDIR}/${pydir}/${f} ${ASAPDIR}/
77done
78
79for f in ${libfiles}
80do
81 cp -f ${SRCDIR}/${libdir}/${f} ${ASAPDIR}/
82done
83
84for f in ${binfiles}
85do
86 cp -f ${SRCDIR}/${bindir}/${f} ${BINDIR}/
87done
88
89#chmod -R g+w ${ASAPDIR}
90echo "Successfully installed the asap module into ${ASAPDIR}"
Note: See TracBrowser for help on using the repository browser.