source: trunk/external/casa_asap/install.sh@ 1170

Last change on this file since 1170 was 1161, checked in by mar637, 18 years ago

swapped filenames install.sh/ build.sh

  • Property svn:executable set to *
File size: 1.1 KB
Line 
1#!/bin/sh
2
3ROOTDIR=`pwd`
4
5# insert flags to make it install with gcc-4.1
6gv=`gcc -dumpversion | sed -e 's#\.# #g'`
7major=`/bin/echo $gv | awk '{ print $1 }'`
8minor=`/bin/echo $gv | awk '{ print $2 }'`
9cppflags=''
10if [ $major -eq 4 ] && [ $minor -ge 1 ]; then
11 cppflags='-ffriend-injection -fpermissive '
12elif [ $major -eq 2 ]; then
13 echo "gcc version < 3 not supported"
14 exit 1
15fi
16
17for AIPSINIT in aipsinit.sh aipsinit.csh
18do
19 if [ ! -f $AIPSINIT ]
20 then
21 sed -e "s#__AIPSROOT#$ROOTDIR#g" $AIPSINIT.template > $AIPSINIT
22 fi
23done
24
25# detect 64bit
26platf=`uname -m | grep '64'`
27arch=`uname -s`
28
29if [ ! $platf == '' ]; then
30 mv $ROOTDIR/linux $ROOTDIR/linux_64b
31 cd $ROOTDIR/linux_64b/UNKNOWN_SITE
32 cat makedefs.64 | sed -e "s#-Wall #-Wall $flags#" > makedefs
33 cd $ROOTDIR
34elif [ $arch == 'Darwin' ]; then
35 mv $ROOTDIR/linux $ROOTDIR/darwin
36 cd $ROOTDIR/darwin/UNKNOWN_SITE
37 cat makedefs.darwin > makedefs
38 cd $ROOTDIR
39else
40 cd $ROOTDIR/linux/UNKNOWN_SITE
41 cat makedefs.32 | sed -e "s#-Wall #-Wall $flags#" > makedefs
42 cd $ROOTDIR
43fi
Note: See TracBrowser for help on using the repository browser.