125 |
else |
else |
126 |
|
|
127 |
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command |
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command |
128 |
# might cause directories to be created, which would be especially bad |
# might cause directories to be created, which would be especially bad |
129 |
# if $src (and thus $dsttmp) contains '*'. |
# if $src (and thus $dsttmp) contains '*'. |
130 |
|
|
131 |
if [ -f $src -o -d $src ] |
if [ -f $src -o -d $src ] |
202 |
|
|
203 |
# If we're going to rename the final executable, determine the name now. |
# If we're going to rename the final executable, determine the name now. |
204 |
|
|
205 |
if [ x"$transformarg" = x ] |
if [ x"$transformarg" = x ] |
206 |
then |
then |
207 |
dstfile=`basename $dst` |
dstfile=`basename $dst` |
208 |
else |
else |
209 |
dstfile=`basename $dst $transformbasename | |
dstfile=`basename $dst $transformbasename | |
210 |
sed $transformarg`$transformbasename |
sed $transformarg`$transformbasename |
211 |
fi |
fi |
212 |
|
|
213 |
# don't allow the sed command to completely eliminate the filename |
# don't allow the sed command to completely eliminate the filename |
214 |
|
|
215 |
if [ x"$dstfile" = x ] |
if [ x"$dstfile" = x ] |
216 |
then |
then |
217 |
dstfile=`basename $dst` |
dstfile=`basename $dst` |
218 |
else |
else |
243 |
# Now rename the file to the real destination. |
# Now rename the file to the real destination. |
244 |
|
|
245 |
$doit $rmcmd -f $dstdir/$dstfile && |
$doit $rmcmd -f $dstdir/$dstfile && |
246 |
$doit $mvcmd $dsttmp $dstdir/$dstfile |
$doit $mvcmd $dsttmp $dstdir/$dstfile |
247 |
|
|
248 |
fi && |
fi && |
249 |
|
|