/[emacs]/emacs/install-sh
ViewVC logotype

Diff of /emacs/install-sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by fx, Mon Oct 11 09:45:52 1999 UTC revision 1.1.18.1 by miles, Fri Apr 4 06:19:49 2003 UTC
# Line 115  fi Line 115  fi
115  if [ x"$dir_arg" != x ]; then  if [ x"$dir_arg" != x ]; then
116          dst=$src          dst=$src
117          src=""          src=""
118            
119          if [ -d $dst ]; then          if [ -d $dst ]; then
120                  instcmd=:                  instcmd=:
121          else          else
# Line 124  if [ x"$dir_arg" != x ]; then Line 124  if [ x"$dir_arg" != x ]; then
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 ]
# Line 134  else Line 134  else
134                  echo "install:  $src does not exist"                  echo "install:  $src does not exist"
135                  exit 1                  exit 1
136          fi          fi
137            
138          if [ x"$dst" = x ]          if [ x"$dst" = x ]
139          then          then
140                  echo "install:  no destination specified"                  echo "install:  no destination specified"
# Line 162  dstdir=`echo $dst | sed -e 's,[^/]*$,,;s Line 162  dstdir=`echo $dst | sed -e 's,[^/]*$,,;s
162    
163  # Skip lots of stat calls in the usual case.  # Skip lots of stat calls in the usual case.
164  if [ ! -d "$dstdir" ]; then  if [ ! -d "$dstdir" ]; then
165  defaultIFS='      defaultIFS='
166  '  '
167  IFS="${IFS-${defaultIFS}}"  IFS="${IFS-${defaultIFS}}"
168    
# Line 201  else Line 201  else
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
# Line 242  else Line 242  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    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.18.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26