blob: b2500125c8fb97d7775a01b9c79d2e90e72af4c8 (
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
#!/bin/bash
#
# CONFIGURE -- Bootstrap the dynamic external package system by downloading
# the repository manifest and creating a workable Makefile to be used for
# install packages and updates. This script only needs to be run once
# after the system is installed, thereafter the 'make' commands are used.
# See the README file for details.
clean=1
irafdir=`pwd`/../util
# Process cmdline flags.
while [ -n "$1" ]; do
case "$1" in
"-noclean") # clean all package sources
set clean = 0
;;
*)
break
;;
esac
shift
done
/bin/echo "Initializing repository data ...."
$irafdir/pkginit # init repository information
# Create the template Makefile.
/bin/echo "Creating system makefile ...."
cat << MAKE_TEMP_END > Makefile
#
# Makefile for IRAF external package installation/maintenance.
#
# ---------------------------------------------------------------------------
# Compiler Flags.
RELEASE = v2.16
all:: update
# Update recent changes from the repository.
update::
@./configure -noclean
@../util/pkgupdate -all
# Install all available packages for this platform.
install_all::
@../util/pkgall
# List packages available on the repository.
list::
@cat .repo_pkgs
# Clean the IRAF tree of binaries for the currently configured arch.
init::
@../util/pkgclean -init
# Remove all package code but leave the structure in place.
clean::
@../util/pkgclean -all
# Restore the dynamic package directory to its distribution state.
distclean::
@../util/pkgclean -init
# Check to see which installed packages could be updated.
check::
@../util/pkgupdate -list
# Update recent changes from the repository.
self_update::
@../util/pkgupdate -self
@./configure -noclean
# Update recent changes from the repository.
config_update::
@../util/pkgupdate -config
MAKE_TEMP_END
echo "Setup Complete."
# For each package we have, append a makefile entry.
files=`cat .repo_pkgs`
for p in ${files[@]}; do
# Create template makefile entries for each package
/bin/echo "${p}::" >> Makefile
/bin/echo " @../util/pkginst $p" >> Makefile
/bin/echo "clean_${p}::" >> Makefile
/bin/echo " @../util/pkgclean $p" >> Makefile
/bin/echo "update_${p}::" >> Makefile
/bin/echo " @../util/pkgupdate $p" >> Makefile
/bin/echo "" >> Makefile
# Create the directory
if [ -e "$p" ]; then
if (( $clean==1 )); then
/bin/rm -rf $p
fi
else
mkdir $p
fi
done
if (( $clean==0 )); then
exit 0
fi
/bin/echo ""
/bin/echo ""
/bin/echo " To install packages, use 'ls' to list the currently available"
/bin/echo " packages from the IRAF repository. For each package you wish"
/bin/echo " to install, use the command:"
/bin/echo ""
/bin/echo " make <pkg>"
/bin/echo ""
/bin/echo " The package will be loaded dynamically the next time you start"
/bin/echo " the CL session."
/bin/echo ""
/bin/echo " Use the commmands:"
/bin/echo ""
/bin/echo " make update # to update pkgs to the latest repository version"
/bin/echo " make check # to list available updates"
/bin/echo " make clean # to delete installed all packages"
/bin/echo " make init # restore to pre-configure state"
/bin/echo " make <pkg> # to force a re-install of named <pkg>"
/bin/echo ""
/bin/echo ""
exit 0
|