source: trunk/bin/install.sh @ 372

Last change on this file since 372 was 372, checked in by vor010, 19 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
10if [ x"$NARRABRI_ASAP" = xyes ];
11then
12ASAPDIR='/DATA/KAPUTAR_2/vor010/ASAP/site-packages/asap'
13SRCDIR='/DATA/KAPUTAR_2/vor010/ASAP/asap'
14else
15ASAPDIR='/usr/local/lib/python2.3/site-packages/asap'
16SRCDIR='/u/mar637/brage/singledish/asap'
17fi
18#
19
20# check to allow setup via command line parameters
21if [ x"$1" != x ];
22then
23ASAPDIR=$1
24echo "ASAP will be installed into "$ASAPDIR
25fi
26
27if [ x"$2" != x ];
28then
29SRCDIR=$2
30echo "from "$SRCDIR
31fi
32
33# where the source python files are
34pydir='python'
35# where the library modules is
36libdir='lib'
37# the python files to install
38srcfiles="__init__.py asapmath.py scantable.py asapreader.py asaplot.py asapfitter.py asapplotter.py asaplinefind.py"
39# the libraries to install
40libfiles='_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
49if [ -d ${SRCDIR} ] ; then
50    cd ${SRCDIR}
51else
52    echo "No source directory found."
53    exit 0
54fi
55
56# check if the site-packes directory exists and create if necessary
57if [ -d ${ASAPDIR} ] ; then
58    echo "Using existing asap module dir."
59else
60    mkdir ${ASAPDIR}
61fi
62
63# install asap files
64for f in ${srcfiles}
65do
66    cp -f ${SRCDIR}/${pydir}/${f} ${ASAPDIR}/
67done
68
69for f in ${libfiles}
70do
71    cp -f ${SRCDIR}/${libdir}/${f} ${ASAPDIR}/
72done
73chmod -R g+w ${ASAPDIR}
74echo "Successfully installed the asap module into ${ASAPDIR}"
75
76
Note: See TracBrowser for help on using the repository browser.