aboutsummaryrefslogtreecommitdiff
path: root/util/mksysgen
blob: 48c4b338a7279b3efca33a0817533a5843f770e1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash
#

# Initialize the $iraf and environment.
if [ -z "$iraf" ]; then
  if [ -e "$HOME/.iraf/setup.sh" ]; then
    source $HOME/.iraf/setup.sh
  else
    source unix/hlib/setup.sh
  fi
else
    source $iraf/unix/hlib/setup.sh
fi


if [ -z "$iraf" ]; then
    #/bin/echo ""
    #/bin/echo "Error:  You must have the iraf env variable defined !"
    #/bin/echo ""
    #exit 1

    iraf=`pwd`/
fi

if [ -e "$HOME/.iraf/arch" ]; then
  if [ -n "$IRAFARCH" ]; then
    iarch=`cat $HOME/.iraf/arch`
    if [ "$iarch" != "$IRAFARCH" ]; then
      /bin/echo ""
      /bin/echo 'Error:  Your $IRAFARCH does not match $HOME/.iraf/arch,'
      /bin/echo '        Please change $IRAFARCH or rerun install script.'
      /bin/echo ""
      exit 1
    fi
  fi
fi

c_start=`date`
/bin/rm -f spool */spool


$iraf/util/mkclean				# clean old binaries

cd $iraf/unix					# NOVOS bootstrap
source hlib/irafuser.sh
sh -x mkpkg.sh 2>&1 | tee -a spool

cd $iraf/					# build NOVOS
mkpkg 2>&1 | tee -a spool

cd $iraf/unix					# VOS bootstrap
source hlib/irafuser.sh
sh -x mkpkg.sh 2>&1 | tee -a spool

cd $iraf/vendor					# build vendor libs
make all 2>&1 | tee -a ../spool.final
cd ../

cd $iraf/					# build core system
mkpkg 2>&1 | tee -a spool

cd $iraf/noao					# build NOAO package
export noao=`pwd`/
mkpkg -p noao 2>&1 | tee -a ../spool.final

cd $iraf/vo					# build NOAO package
export vo=`pwd`/
mkpkg -p vo 2>&1 | tee -a ../spool.final

/bin/rm -rf bin*/pkgconfig			# misc clean up

c_end=`date`


/bin/echo ""
/bin/echo ""
/bin/echo ""
/bin/echo "Start:  $c_start"
/bin/echo "  End:  $c_end"