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