#!/bin/sh # install - install a program, script, or datafile
scriptversion=2011-11-20.07; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license.
java.lang.NullPointerException # Copyright (C) 1994 X Consortium
java.lang.NullPointerException # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions:
java.lang.NullPointerException # The above copyright notice andthis permission notice shall be included in # all copies or substantial portions of the Software.
java.lang.NullPointerException # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
java.lang.NullPointerException # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium.
java.lang.NullPointerException
java.lang.NullPointerException # FSF changes to this file are in the public domain.
java.lang.NullPointerException # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile.
java.lang.NullPointerException # This script is compatible with the BSD install script, but was written # from scratch.
nl=' '
IFS=" "" $nl"
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-} if test -z "$doit"; then
doit_exec=exec else
doit_exec=$doit
fi
# Put in absolute file names if you don't have them in your path; # or use environment vars.
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
--help display this help andexit.
--version display version info andexit.
-c (ignored)
-C install only if different (preserve the last data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
-t) dst_arg=$2 # Protect names problematic for'test'and other utilities. case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) no_target_directory=true;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift break;;
-*) echo "$0: invalid option: $1" >&2 exit1;;
*) break;;
esac
shift
done
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg.
set fnord "$@""$dst_arg"
shift # fnord
fi
shift # arg
dst_arg=$arg # Protect names problematic for'test'and other utilities. case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
done
fi
if test $# -eq 0; then if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2 exit1
fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit0
fi
if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit"1
trap "ret=130; $do_exit"2
trap "ret=141; $do_exit"13
trap "ret=143; $do_exit"15
# Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
*[0-7]) if test -z "$stripcmd"; then
u_plus_rw= else
u_plus_rw='% 200'
fi
cp_umask=`expr '('777 - $mode % 1000')' $u_plus_rw`;;
*) if test -z "$stripcmd"; then
u_plus_rw= else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src do # Protect names problematic for'test'and other utilities. case $src in
-* | [=\(\)!]) src=./$src;;
esac
if test -n "$dir_arg"; then
dst=$src
dstdir=$dst
test -d "$dstdir"
dstdir_status=$? else
# Waiting forthis to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2 exit1
fi
if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2 exit1
fi
dst=$dst_arg
# If destination is a directory, append the input filename; won't work # ifdouble slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then
echo "$0: $dst_arg: Is a directory" >&2 exit1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir"
dstdir_status=$?
fi
fi
obsolete_mkdir_used=false
if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask` case $stripcmd.$umask in # Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
# With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then
mkdir_mode=-m$mode else
mkdir_mode=
fi
posix_mkdir=false case $umask in
*[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret'0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d""$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap ''0;;
esac;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then : else
# The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go.
case $dstdir in /*) prefix='/';; [-=\(\)!]*)prefix='./';; *)prefix='';; esac
prefix=$prefix$d iftest-d"$prefix";then prefixes= else if$posix_mkdir;then (umask=$mkdir_umask&& $doit_exec$mkdirprog$mkdir_mode-p--"$dstdir")&&break #Don'tfailiftwoinstancesarerunningconcurrently. test-d"$prefix"||exit1 else case$prefixin *\'*)qprefix=`echo"$prefix"|sed"s/'/'\\\\\\\\''/g"`;; *)qprefix=$prefix;; esac prefixes="$prefixes'$qprefix'" fi fi prefix=$prefix/ done
iftest-n"$prefixes";then #Don'tfailiftwoinstancesarerunningconcurrently. (umask$mkdir_umask&& eval"\$doit_exec\$mkdirprog$prefixes")|| test-d"$dstdir"||exit1 obsolete_mkdir_used=true fi fi fi
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.15Angebot
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-09-27)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.