Lines 5-12
Link Here
|
5 |
# |
5 |
# |
6 |
# Licensed under the ACL (Ada Community License) |
6 |
# Licensed under the ACL (Ada Community License) |
7 |
|
7 |
|
8 |
TMPDIR="${TMPDIR:-/tmp}" # Temp file directory |
8 |
TMP_DIR="${TMP_DIR:-/tmp}" # Temp file directory |
9 |
TMP="$TMPDIR/$$-1.tmp" # Temp file 1 |
9 |
TMP="$TMP_DIR/$$-1.tmp" # Temp file 1 |
10 |
trap "rm -f $TMP" 0 # Clean up temp file(s) on exit |
10 |
trap "rm -f $TMP" 0 # Clean up temp file(s) on exit |
11 |
|
11 |
|
12 |
UNINSTALL=0 |
12 |
UNINSTALL=0 |
Lines 74-151
Link Here
|
74 |
} |
74 |
} |
75 |
|
75 |
|
76 |
check_include() { |
76 |
check_include() { |
77 |
AVAR="$1" |
77 |
echo "/usr/lib/ada/adainclude" |
78 |
eval "APATH=\"\$$AVAR\"" |
|
|
79 |
( |
80 |
if is_unix ; then |
81 |
IFS=: |
82 |
else |
83 |
IFS=';' |
84 |
fi |
85 |
for dir in $APATH ; do |
86 |
if is_unix ; then |
87 |
echo "$dir" |
88 |
else |
89 |
echo $(cygpath "$dir") |
90 |
fi |
91 |
done |
92 |
) | ( |
93 |
rc=1 |
94 |
while read dir ; do |
95 |
if [ -w "$dir" ] ; then |
96 |
rc=0 |
97 |
echo "$dir" |
98 |
fi |
99 |
done |
100 |
) >$TMP |
101 |
if [ $? -ne 0 ] ; then |
102 |
cat <<EOF >/dev/tty |
103 |
---------------------------------------------------------------------- |
104 |
None of the directories in $AVAR are writable by $LOGNAME. |
105 |
|
106 |
You will need to either gain access to one directory referenced |
107 |
by $AVAR, or you will need to create a local directory and append |
108 |
that to the list int $AVAR. |
109 |
|
110 |
Try make install again, after you take care of this issue. |
111 |
---------------------------------------------------------------------- |
112 |
EOF |
113 |
exit 1 |
114 |
fi |
115 |
count=$(wc -l <$TMP) |
116 |
if [ $count -gt 1 ] ; then |
117 |
loop=true |
118 |
while $loop ; do |
119 |
cat <<EOF >/dev/tty |
120 |
---------------------------------------------------------------------- |
121 |
There is more than one writable directory in $AVAR that I could use. |
122 |
|
123 |
Please enter the line number you want to choose below: |
124 |
|
125 |
EOF |
126 |
cat -n $TMP >/dev/tty |
127 |
echo >/dev/tty |
128 |
echo "Enter your choice below (q to quit)?" >/dev/tty |
129 |
read selection </dev/tty |
130 |
|
131 |
case "$selection" in |
132 |
q* | Q* ) echo "Try again later."; exit 1;; |
133 |
* ) ;; |
134 |
esac |
135 |
|
136 |
if [ $selection -gt 0 -a $selection -le $count ] ; then |
137 |
loop=false |
138 |
continue |
139 |
fi |
140 |
echo >/dev/tty |
141 |
echo "Choose a number between 1 and $count please." >/dev/tty |
142 |
echo >/dev/tty |
143 |
done |
144 |
dir=$(sed -n ${selection}p <$TMP) |
145 |
else |
146 |
dir=$(cat $TMP) |
147 |
fi |
148 |
echo "$dir" |
149 |
} |
78 |
} |
150 |
|
79 |
|
151 |
check_instfile() { |
80 |
check_instfile() { |
Lines 163-169
Link Here
|
163 |
install_files() { |
92 |
install_files() { |
164 |
INSTVAR="$1" |
93 |
INSTVAR="$1" |
165 |
eval INSTLST="\$$INSTVAR" |
94 |
eval INSTLST="\$$INSTVAR" |
166 |
INSTDIR="$2" |
95 |
INSTDIR=${D}"$2" |
167 |
INSTMODE="$3" |
96 |
INSTMODE="$3" |
168 |
for file in $INSTLST ; do |
97 |
for file in $INSTLST ; do |
169 |
if [ ! -r $file ] ; then |
98 |
if [ ! -r $file ] ; then |
Lines 181-187
Link Here
|
181 |
uninstall_files() { |
110 |
uninstall_files() { |
182 |
INSTVAR="$1" |
111 |
INSTVAR="$1" |
183 |
eval INSTLST="\$$INSTVAR" |
112 |
eval INSTLST="\$$INSTVAR" |
184 |
INSTDIR="$2" |
113 |
INSTDIR=${D}"$2" |
185 |
INSTMODE="$3" |
114 |
INSTMODE="$3" |
186 |
for file in $INSTLST ; do |
115 |
for file in $INSTLST ; do |
187 |
if [ -f "$INSTDIR/$file" ] ; then |
116 |
if [ -f "$INSTDIR/$file" ] ; then |
Lines 251-263
Link Here
|
251 |
fi |
180 |
fi |
252 |
|
181 |
|
253 |
echo |
182 |
echo |
254 |
echo "Ready to continue install? Press RETURN (Q or ^C to quit)" >/dev/tty |
|
|
255 |
read reply </dev/tty |
256 |
|
257 |
case "$reply" in |
258 |
Q* | q* ) exit 1;; |
259 |
* ) ;; |
260 |
esac |
261 |
|
183 |
|
262 |
install_files INSTSPEC $INCLDIR 444 |
184 |
install_files INSTSPEC $INCLDIR 444 |
263 |
install_files INSTALIS $OBJSDIR 444 |
185 |
install_files INSTALIS $OBJSDIR 444 |