/[svn]/ircd-hybrid/trunk/install-sh
ViewVC logotype

Diff of /ircd-hybrid/trunk/install-sh

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

revision 1156 by michael, Tue Aug 9 20:29:20 2011 UTC revision 1257 by michael, Sun Jan 15 06:28:46 2012 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/sh
2  # install - install a program, script, or datafile  # install - install a program, script, or datafile
3    
4  scriptversion=2010-02-06.18; # UTC  scriptversion=2011-01-19.21; # UTC
5    
6  # This originates from X11R5 (mit/util/scripts/install.sh), which was  # This originates from X11R5 (mit/util/scripts/install.sh), which was
7  # later released in X11R6 (xc/config/util/install.sh) with the  # later released in X11R6 (xc/config/util/install.sh) with the
# Line 156  while test $# -ne 0; do Line 156  while test $# -ne 0; do
156      -s) stripcmd=$stripprog;;      -s) stripcmd=$stripprog;;
157    
158      -t) dst_arg=$2      -t) dst_arg=$2
159            # Protect names problematic for `test' and other utilities.
160            case $dst_arg in
161              -* | [=\(\)!]) dst_arg=./$dst_arg;;
162            esac
163          shift;;          shift;;
164    
165      -T) no_target_directory=true;;      -T) no_target_directory=true;;
# Line 186  if test $# -ne 0 && test -z "$dir_arg$ds Line 190  if test $# -ne 0 && test -z "$dir_arg$ds
190      fi      fi
191      shift # arg      shift # arg
192      dst_arg=$arg      dst_arg=$arg
193        # Protect names problematic for `test' and other utilities.
194        case $dst_arg in
195          -* | [=\(\)!]) dst_arg=./$dst_arg;;
196        esac
197    done    done
198  fi  fi
199    
# Line 232  fi Line 240  fi
240    
241  for src  for src
242  do  do
243    # Protect names starting with `-'.    # Protect names problematic for `test' and other utilities.
244    case $src in    case $src in
245      -*) src=./$src;;      -* | [=\(\)!]) src=./$src;;
246    esac    esac
247    
248    if test -n "$dir_arg"; then    if test -n "$dir_arg"; then
# Line 256  do Line 264  do
264        echo "$0: no destination specified." >&2        echo "$0: no destination specified." >&2
265        exit 1        exit 1
266      fi      fi
   
267      dst=$dst_arg      dst=$dst_arg
     # Protect names starting with `-'.  
     case $dst in  
       -*) dst=./$dst;;  
     esac  
268    
269      # If destination is a directory, append the input filename; won't work      # If destination is a directory, append the input filename; won't work
270      # if double slashes aren't ignored.      # if double slashes aren't ignored.
# Line 389  do Line 392  do
392    
393        case $dstdir in        case $dstdir in
394          /*) prefix='/';;          /*) prefix='/';;
395          -*) prefix='./';;          [-=\(\)!]*) prefix='./';;
396          *)  prefix='';;          *)  prefix='';;
397        esac        esac
398    
# Line 407  do Line 410  do
410    
411        for d        for d
412        do        do
413          test -z "$d" && continue          test X"$d" = X && continue
414    
415          prefix=$prefix$d          prefix=$prefix$d
416          if test -d "$prefix"; then          if test -d "$prefix"; then

Legend:
Removed from v.1156  
changed lines
  Added in v.1257

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28