install-sh revision 40f53fa8d9c6a4fc38c0014495e7a42b08f52481
7377963ff2197709fbc259d8456b7ecf5b7debb5vboxsync# install - install a program, script, or datafile
7377963ff2197709fbc259d8456b7ecf5b7debb5vboxsync# This comes from X11R5 (mit/util/scripts/install.sh).
7377963ff2197709fbc259d8456b7ecf5b7debb5vboxsync# Copyright 1991 by the Massachusetts Institute of Technology
7377963ff2197709fbc259d8456b7ecf5b7debb5vboxsync# Permission to use, copy, modify, distribute, and sell this software and its
7377963ff2197709fbc259d8456b7ecf5b7debb5vboxsync# documentation for any purpose is hereby granted without fee, provided that
7377963ff2197709fbc259d8456b7ecf5b7debb5vboxsync# the above copyright notice appear in all copies and that both that
7377963ff2197709fbc259d8456b7ecf5b7debb5vboxsync# copyright notice and this permission notice appear in supporting
7377963ff2197709fbc259d8456b7ecf5b7debb5vboxsync# documentation, and that the name of M.I.T. not be used in advertising or
7377963ff2197709fbc259d8456b7ecf5b7debb5vboxsync# publicity pertaining to distribution of the software without specific,
7377963ff2197709fbc259d8456b7ecf5b7debb5vboxsync# written prior permission. M.I.T. makes no representations about the
7377963ff2197709fbc259d8456b7ecf5b7debb5vboxsync# suitability of this software for any purpose. It is provided "as is"
7377963ff2197709fbc259d8456b7ecf5b7debb5vboxsync# without express or implied warranty.
7377963ff2197709fbc259d8456b7ecf5b7debb5vboxsync# Calling this script install-sh is preferred over install.sh, to prevent
7377963ff2197709fbc259d8456b7ecf5b7debb5vboxsync# `make' implicit rules from creating a file called install from it
7377963ff2197709fbc259d8456b7ecf5b7debb5vboxsync# when there is no Makefile.
7377963ff2197709fbc259d8456b7ecf5b7debb5vboxsync# This script is compatible with the BSD install script, but was written
7377963ff2197709fbc259d8456b7ecf5b7debb5vboxsync# from scratch. It can only install one file at a time, a restriction
7377963ff2197709fbc259d8456b7ecf5b7debb5vboxsync# shared with many OS's install programs.
7377963ff2197709fbc259d8456b7ecf5b7debb5vboxsync# set DOITPROG to echo to test this script
e00d701bbdc8f27f25cc232d9e507622a731b390vboxsync# Don't use :- since 4.3BSD and earlier shells don't like it.
7377963ff2197709fbc259d8456b7ecf5b7debb5vboxsync# put in absolute paths if you don't have them in your path; or use env. vars.
-d) dir_arg=true
*) if [ x"$src" = x ]
if [ x"$src" = x ]
if [ x"$dir_arg" != x ]; then
if [ -d $dst ]; then
instcmd=:
echo "install: $src does not exist"
if [ x"$dst" = x ]
if [ -d $dst ]
if [ ! -d "$dstdir" ]; then
if [ x"$dir_arg" != x ]
if [ x"$transformarg" = x ]
if [ x"$dstfile" = x ]