Check-in [d1a62f7c5d]
Overview
Comment:Updated install-sh
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:d1a62f7c5dc8bf3e8b04b2af61cdb183c6ebc028
User & Date: rkeene on 2014-07-05 00:03:53
Other Links: manifest | tags
Context
2014-07-05
00:04
Updated MIPS test builds to be MUSL (static) based instead of uClibc check-in: 1ec331082c user: rkeene tags: trunk
00:03
Updated install-sh check-in: d1a62f7c5d user: rkeene tags: trunk
2014-07-04
23:58
Added Linux/MUSL support to our build platform check-in: 18d54c5945 user: rkeene tags: trunk
Changes

Modified kitsh/buildsrc/kitsh-0.0/install-sh from [6381bb24b0] to [06ee6336e6].

     1      1   #!/bin/sh
     2      2   # install - install a program, script, or datafile
     3      3   
     4         -scriptversion=2010-02-06.18; # UTC
            4  +scriptversion=2011-01-19.21; # UTC
     5      5   
     6      6   # This originates from X11R5 (mit/util/scripts/install.sh), which was
     7      7   # later released in X11R6 (xc/config/util/install.sh) with the
     8      8   # following copyright and license.
     9      9   #
    10     10   # Copyright (C) 1994 X Consortium
    11     11   #
................................................................................
   152    152   
   153    153       -o) chowncmd="$chownprog $2"
   154    154   	shift;;
   155    155   
   156    156       -s) stripcmd=$stripprog;;
   157    157   
   158    158       -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
   159    163   	shift;;
   160    164   
   161    165       -T) no_target_directory=true;;
   162    166   
   163    167       --version) echo "$0 $scriptversion"; exit $?;;
   164    168   
   165    169       --)	shift
................................................................................
   182    186       if test -n "$dst_arg"; then
   183    187         # $@ is not empty: it contains at least $arg.
   184    188         set fnord "$@" "$dst_arg"
   185    189         shift # fnord
   186    190       fi
   187    191       shift # arg
   188    192       dst_arg=$arg
          193  +    # Protect names problematic for `test' and other utilities.
          194  +    case $dst_arg in
          195  +      -* | [=\(\)!]) dst_arg=./$dst_arg;;
          196  +    esac
   189    197     done
   190    198   fi
   191    199   
   192    200   if test $# -eq 0; then
   193    201     if test -z "$dir_arg"; then
   194    202       echo "$0: no input file specified." >&2
   195    203       exit 1
................................................................................
   228    236         fi
   229    237         cp_umask=$mode$u_plus_rw;;
   230    238     esac
   231    239   fi
   232    240   
   233    241   for src
   234    242   do
   235         -  # Protect names starting with `-'.
          243  +  # Protect names problematic for `test' and other utilities.
   236    244     case $src in
   237         -    -*) src=./$src;;
          245  +    -* | [=\(\)!]) src=./$src;;
   238    246     esac
   239    247   
   240    248     if test -n "$dir_arg"; then
   241    249       dst=$src
   242    250       dstdir=$dst
   243    251       test -d "$dstdir"
   244    252       dstdir_status=$?
................................................................................
   252    260         exit 1
   253    261       fi
   254    262   
   255    263       if test -z "$dst_arg"; then
   256    264         echo "$0: no destination specified." >&2
   257    265         exit 1
   258    266       fi
   259         -
   260    267       dst=$dst_arg
   261         -    # Protect names starting with `-'.
   262         -    case $dst in
   263         -      -*) dst=./$dst;;
   264         -    esac
   265    268   
   266    269       # If destination is a directory, append the input filename; won't work
   267    270       # if double slashes aren't ignored.
   268    271       if test -d "$dst"; then
   269    272         if test -n "$no_target_directory"; then
   270    273   	echo "$0: $dst_arg: Is a directory" >&2
   271    274   	exit 1
................................................................................
   385    388   
   386    389         # The umask is ridiculous, or mkdir does not conform to POSIX,
   387    390         # or it failed possibly due to a race condition.  Create the
   388    391         # directory the slow way, step by step, checking for races as we go.
   389    392   
   390    393         case $dstdir in
   391    394   	/*) prefix='/';;
   392         -	-*) prefix='./';;
          395  +	[-=\(\)!]*) prefix='./';;
   393    396   	*)  prefix='';;
   394    397         esac
   395    398   
   396    399         eval "$initialize_posix_glob"
   397    400   
   398    401         oIFS=$IFS
   399    402         IFS=/
................................................................................
   403    406         $posix_glob set +f
   404    407         IFS=$oIFS
   405    408   
   406    409         prefixes=
   407    410   
   408    411         for d
   409    412         do
   410         -	test -z "$d" && continue
          413  +	test X"$d" = X && continue
   411    414   
   412    415   	prefix=$prefix$d
   413    416   	if test -d "$prefix"; then
   414    417   	  prefixes=
   415    418   	else
   416    419   	  if $posix_mkdir; then
   417    420   	    (umask=$mkdir_umask &&