source: branches/Release-2-fixes/bin/install.sh@ 1375

Last change on this file since 1375 was 531, checked in by mar637, 20 years ago

added asapfit.py

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