forked from spacetelescope/stsdas_stripped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_helper
executable file
·55 lines (47 loc) · 1.11 KB
/
install_helper
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
:
#
# make sure we are invoked correctly
if [ "$0" != ./install_helper ]
then
echo 'Read the instructions in Install.rst'
exit 1
fi
# make sure we have iraf available
if [ "$iraf" = "" ]
then
if [ -d /iraf/iraf/ ]
then
iraf=/iraf/iraf
else
echo 'The "iraf" environment variable is not set, and iraf is not in /iraf/iraf/'
echo 'You must set the iraf environment variable first.'
exit 1
fi
fi
# where are we now?
here=`pwd`
# customize the local extern.pkg fragment
sed 's?ROOT?'$here'?' < release_tools/extern.pkg.proto > extern.pkg
# get iraf.h for stsdas to use
rm -f stsdas/iraf.h
ln -s $iraf/unix/hlib/libc/iraf.h stsdas/
# where is our localized extern.pkg fragment?
extern_pkg=$here/extern.pkg
# see if IRAF is using our localized extern.pkg ...
{
# ... no, tell the user how to fix it
echo ''
echo 'Edit the file'
echo ' '${iraf}unix/hlib/extern.pkg
echo ''
echo 'Copy/paste these lines just before where it says "Do not modify below this line"'
echo ''
if grep -q 'reset.*helpdb.*=.*"' ${iraf}unix/hlib/extern.pkg
then
:
else
echo 'reset helpdb = " "'
fi
cat extern.pkg
echo ''
} >&2