aboutsummaryrefslogtreecommitdiffstats
path: root/libical/install-sh
blob: 0ff4b6a08e8077bdb9374c2d1bc8bec4e1f1eea4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#!/bin/sh

#
# install - install a program, script, or datafile
# This comes from X11R5; it is not part of GNU.
#
# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $
#
# This script is compatible with the BSD install script, but was written
# from scratch.
#


# set DOITPROG to echo to test this script

# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"


# put in absolute paths if you don't have them in your path; or use env. vars.

mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"

instcmd="$mvprog"
chmodcmd=""
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""

while [ x"$1" != x ]; do
    case $1 in
    -c) instcmd="$cpprog"
        shift
        continue;;

    -m) chmodcmd="$chmodprog $2"
        shift
        shift
        continue;;

    -o) chowncmd="$chownprog $2"
        shift
        shift
        continue;;

    -g) chgrpcmd="$chgrpprog $2"
        shift
        shift
        continue;;

    -s) stripcmd="$stripprog"
        shift
        continue;;

    *)  if [ x"$src" = x ]
        then
        src=$1
        else
        dst=$1
        fi
        shift
        continue;;
    esac
done

if [ x"$src" = x ]
then
    echo "install:  no input file specified"
    exit 1
fi

if [ x"$dst" = x ]
then
    echo "install:  no destination specified"
    exit 1
fi


# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic

if [ -d $dst ]
then
    dst="$dst"/`basename $src`
fi

# Make a temp file name in the proper directory.

dstdir=`dirname $dst`
dsttmp=$dstdir/#inst.$$#

# Move or copy the file name to the temp name

$doit $instcmd $src $dsttmp

# and set any options; do chmod last to preserve setuid bits

if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi

# Now rename the file to the real destination.

$doit $rmcmd $dst
$doit $mvcmd $dsttmp $dst


exit 0
snapshot of GCC 4.6.4, which nearlygerald2012-03-041-2/+2 * Update to what is basically the first RC of GCC 4.6.3.gerald2012-02-271-2/+2 * Update to the 20120217 snapshot of GCC 4.6.3.gerald2012-02-181-2/+2 * Update to the 20120203 snapshot of GCC 4.6.3.gerald2012-02-041-2/+2 * Update to the 20120120 snapshot of GCC 4.6.3.gerald2012-01-231-2/+2 * Update to the 20120113 snapshot of GCC 4.6.3.gerald2012-01-141-2/+2 * Update to the 20120106 snapshot of GCC 4.6.3.gerald2012-01-071-2/+2 * Update to the 20111209 snapshot of GCC 4.6.3.gerald2011-12-111-2/+2 * Update to the 20111202 snapshot of GCC 4.6.3.gerald2011-12-051-2/+2 * Update to the 20111125 snapshot of GCC 4.6.3. This now builds ongerald2011-11-261-2/+2 * Update to the 20111118 snapshot of GCC 4.6.3.gerald2011-11-201-2/+2 * Update to the 20111111 snapshot of GCC 4.6.3.gerald2011-11-131-2/+2 * Update to the 20111104 snapshot of GCC 4.6.3.gerald2011-11-051-2/+2 * Update to the 20111028 snapshot of GCC 4.6.3, nearly the same as thegerald2011-10-291-2/+2 * Update to the 20111021 snapshot of GCC 4.6.2, which is pretty muchgerald2011-10-231-2/+2 * Update to the 20111014 snapshot of GCC 4.6.2.gerald2011-10-161-2/+2 * Update to the 20111007 snapshot of GCC 4.6.2.gerald2011-10-091-2/+2 * Update to the 20110930 snapshot of GCC 4.6.2.gerald2011-10-021-2/+2 * Update to the 20110923 snapshot of GCC 4.6.2.gerald2011-09-251-2/+2 * Update to the 20110916 snapshot of GCC 4.6.2.gerald2011-09-181-2/+2 * Update to the 20110909 snapshot of GCC 4.6.2.gerald2011-09-101-2/+2 * Update to the 20110902 snapshot of GCC 4.6.2.gerald2011-09-051-2/+2 * Update to the 20110826 snapshot of GCC 4.6.2.gerald2011-08-281-2/+2 * Update to the 20110812 snapshot of GCC 4.6.2.gerald2011-08-161-2/+2 * Update to the 20110729 snapshot of GCC 4.6.2.gerald2011-08-011-2/+2 * Update to the 20110722 snapshot of GCC 4.6.2.gerald2011-07-231-2/+2 * Update to the 20110715 snapshot of GCC 4.6.2.gerald2011-07-201-2/+2 * Update to the 20110708 snapshot of GCC 4.6.2.gerald2011-07-111-2/+2 * Update to the 20110701 snapshot of GCC 4.6.2, which is practicallygerald2011-07-041-2/+2 * Update to the 20110610 snapshot of GCC 4.6.1.gerald2011-06-131-2/+2 * Oops, remove testing code (to force older version).gerald2011-06-041-2/+2 * Complete Java support by providing a pre-built copy of ecj.jar.gerald2011-06-031-0/+2 * Update to the 20110526 snapshot of GCC 4.6.1. Upstream now only providesgerald2011-05-291-10/+2 * Update to the 20110520 snapshot of GCC 4.6.1.gerald2011-05-211-10/+10 * Update to the 20110513 snapshot of GCC 4.6.1.gerald2011-05-141-10/+10 * Update to the 20110506 snapshot of GCC 4.6.1.gerald2011-05-081-10/+10 * Update to the 20110429 snapshot of GCC 4.6.1.gerald2011-05-011-10/+10 * Update to the 20110422 snapshot of GCC 4.6.1.gerald2011-04-241-10/+10 * Update to the 20110415 snapshot of GCC 4.6.1.gerald2011-04-171-10/+10 * Update to the 20110408 snapshot of GCC 4.6.1.gerald2011-04-091-10/+10 * Update to the 20110401 snapshot of GCC 4.6.1.gerald2011-04-021-10/+10 * Update to the release of GCC 4.6.0 (basically). Really too many changesgerald2011-03-261-10/+10 * Update to the 20110318 snapshot of GCC 4.6.0.gerald2011-03-191-10/+10 * Update to the 20110312 snapshot of GCC 4.6.0. On the way, remove thegerald2011-03-191-10/+10 * Update to the 20110305 snapshot of GCC 4.6.0. Remove the dependencygerald2011-03-141-10/+10 * Update to the 20110226 snapshot of GCC 4.6.0. The change for codegerald2011-02-271-10/+10 * Update to the 20110219 snapshot of GCC 4.6.0.gerald2011-02-231-10/+10 * Update to the 20110212 snapshot of GCC 4.6.0.gerald2011-02-151-10/+10 * Update to the 20110205 snapshot of GCC 4.6.0. This finally addressesgerald2011-02-061-10/+10 * Update to the 20110129 snapshot of GCC 4.6.0.gerald2011-01-301-10/+10 * Update to the 20110122 snapshot of GCC 4.6.0. Among others, thisgerald2011-01-241-10/+10 * Update to the 20110115 snapshot of GCC 4.6.0.gerald2011-01-171-10/+10 * Update to the 20110108 snapshot of GCC 4.6.0.gerald2011-01-151-10/+10 * Update to the 20110101 snapshot of GCC 4.6.0.gerald2011-01-021-10/+10 * Update to the 20101225 snapshot of GCC 4.6.0. This addresses thegerald2010-12-271-10/+10 * Update to the 20101127 snapshot of GCC 4.6.0.gerald2010-11-291-10/+10 * Update to the 20101120 snapshot of GCC 4.6.0. This brings libquadmathgerald2010-11-221-10/+10 * Update to the 20101113 snapshot of GCC 4.6.0.gerald2010-11-151-10/+10 * Update to the 20101106 snapshot of GCC 4.6.0.gerald2010-11-071-10/+10 * Update to the 20101030 snapshot of GCC 4.6.0.gerald2010-10-311-15/+10 * Update to the 20101023 snapshot of GCC 4.6.0. This removes the gccbuggerald2010-10-241-15/+15 * Update to the 20101016 snapshot of GCC 4.6.0.gerald2010-10-171-15/+15 * Update to the 20101009 snapshot of GCC 4.6.0.gerald2010-10-111-15/+15 * Update to the 20100925 snapshot of GCC 4.6.0.gerald2010-09-261-15/+15 * Update to the 20100918 snapshot of GCC 4.6.0 which now defaults to i486gerald2010-09-191-15/+15 * Update to the 20100911 snapshot of GCC 4.6.0. This brings one fix forgerald2010-09-121-15/+15 * Update to the 20100904 snapshot of GCC 4.6.0. This brings first supportgerald2010-09-061-15/+15 * Update to the 20100828 snapshot of GCC 4.6.0.gerald2010-08-301-15/+15 * Update to the 20100821 snapshot of GCC 4.6.0. This now really does notgerald2010-08-231-15/+15 * Update to the 20100814 snapshot of GCC 4.6.0.gerald2010-08-211-15/+15 * Update to the 20100807 snapshot of GCC 4.6.0.gerald2010-08-081-15/+15 * Update to the 20100724 snapshot of GCC 4.6.0.gerald2010-07-251-15/+15 * Update to the 20100717 snapshot of GCC 4.6.0.gerald2010-07-191-15/+15 * Update to the 20100710 snapshot of GCC 4.6.0.gerald2010-07-111-15/+15 * Update to the 20100703 snapshot of GCC 4.6.0.gerald2010-07-051-15/+15 * Update to the 20100626 snapshot of GCC 4.6.0.gerald2010-06-271-15/+15 * Update to the 20100619 snapshot of GCC 4.6.0.gerald2010-06-201-15/+15 * Update to the 20100612 snapshot of GCC 4.6.0.gerald2010-06-131-15/+15 * Update to the 20100605 snapshot of GCC 4.6.0.gerald2010-06-061-15/+15 * Update to the 20100529 snapshot of GCC 4.6.0.gerald2010-05-301-15/+15 * Update to the 20100515 snapshot of GCC 4.6.0.gerald2010-05-221-15/+15 * Update to the 20100501 snapshot of GCC 4.6.0.gerald2010-05-021-15/+15 * Complete the creation of this port by adjusting it from GCC 4.5 to thegerald2010-04-261-15/+15 * Update to the 20100422 snapshot of GCC 4.5.1.gerald2010-04-251-15/+15 * Update to the 20100415 snapshot of GCC 4.5.1. This is basically thegerald2010-04-191-15/+15 * Update to the 20100401 snapshot of GCC 4.5.0.gerald2010-04-021-15/+15 * Update to the 20100318 snapshot of GCC 4.5.0.gerald2010-03-191-15/+15 * Update to the 20100311 snapshot of GCC 4.5.0.gerald2010-03-131-15/+15 * Update to the 20100304 snapshot of GCC 4.5.0.gerald2010-03-081-15/+15 * Update to the 20100225 snapshot of GCC 4.5.0.gerald2010-02-271-15/+15 * Update to the 20100218 snapshot of GCC 4.5.0.gerald2010-02-191-15/+15 * Update to the 20100211 snapshot of GCC 4.5.0.gerald2010-02-141-15/+15 * Update to the 20100204 snapshot of GCC 4.5.0.gerald2010-02-061-15/+15 * Update to the 20100128 snapshot of GCC 4.5.0.gerald2010-02-021-15/+15 * Update to the 20100114 snapshot of GCC 4.5.0.gerald2010-01-171-15/+15 * Update to the 20100107 snapshot of GCC 4.5.0.gerald2010-01-081-15/+15 * Update to the 20091231 snapshot of GCC 4.5.0 which brings some keygerald2010-01-021-15/+15 * Update to the 20091224 snapshot of GCC 4.5.0. On the way, sort pkg-plistgerald2009-12-281-15/+15 * Update to the 20091217 snapshot of GCC 4.5.0.gerald2009-12-191-15/+15 * Update to the 20091126 snapshot of GCC 4.5.0. Among others this failsgerald2009-11-301-15/+15 * Update to the 20091119 snapshot of GCC 4.5.0.gerald2009-11-201-15/+15 * No longer download Objective-C related files which we don't actually use.gerald2009-11-201-3/+0 * Update to the 20091112 snapshot of GCC 4.5.0.gerald2009-11-131-18/+18 * Update to the 20091105 snapshot of GCC 4.5.0.gerald2009-11-071-18/+18 * Update to the 20091029 snapshot of GCC 4.5.0.gerald2009-10-311-18/+18 * Update to the 20091022 snapshot of GCC 4.5.0.gerald2009-10-251-18/+18 * Update to the 20091015 snapshot of GCC 4.5.0.gerald2009-10-171-18/+18 * Update to the 20091008 snapshot of GCC 4.5.0. Add math/mpc as agerald2009-10-111-18/+18 * Update to the 20091001 snapshot of GCC 4.5.0.gerald2009-10-031-18/+18 * Update to the 20090924 snapshot of GCC 4.5.0.gerald2009-09-261-18/+18 * Update to the 20090917 snapshot of GCC 4.5.0.gerald2009-09-191-18/+18 * Update to the 20090910 snapshot of GCC 4.5.0.gerald2009-09-111-18/+18 * Update to the 20090827 snapshot of GCC 4.5.0.gerald2009-09-041-18/+18 * Update to the 20090820 snapshot of GCC 4.5.0.gerald2009-08-221-18/+18 * Update to the 20090813 snapshot of GCC 4.5.0.gerald2009-08-141-18/+18 * Update to the 20090806 snapshot of GCC 4.5.0.gerald2009-08-071-18/+18 * Update to the 20090730 snapshot of GCC 4.5.0.gerald2009-08-011-18/+18 * Update to the 20090723 snapshot of GCC 4.5.0.gerald2009-07-251-18/+18 * Update to the 20090716 snapshot of GCC 4.5.0.gerald2009-07-181-18/+18 * Update to the 20090709 snapshot of GCC 4.5.0.gerald2009-07-121-18/+18 * Update to the 20090625 snapshot of GCC 4.5.0.gerald2009-06-271-18/+18 * Update to the 20090618 snapshot of GCC 4.5.0. Tweak pkg-descr "footer".gerald2009-06-201-18/+18 * Update to the 20090604 snapshot of GCC 4.5.0.gerald2009-06-061-18/+18 * Update to the 20090528 snapshot of GCC 4.5.0.gerald2009-05-301-18/+18 * Update to the 20090521 snapshot of GCC 4.5.0.gerald2009-05-241-18/+18 * Update to the 20090514 snapshot of GCC 4.5.0.gerald2009-05-181-18/+18 * Update to the 20090507 snapshot of GCC 4.5.0.gerald2009-05-101-18/+18 * Update to the 20090423 snapshot of GCC 4.5.0.gerald2009-04-251-18/+18 * Update to the 20090409 snapshot of GCC 4.5.0.gerald2009-04-101-18/+18 * Initiate lang/gcc45 by updating to the 20090402 snapshot of GCC 4.5.0.gerald2009-04-081-18/+18 * Update to the 20090331 snapshot of GCC 4.4.0.gerald2009-04-011-18/+18 * Update to the 20090327 snapshot of GCC 4.4.0.gerald2009-03-301-18/+18 * Update to the 20090313 snapshot of GCC 4.4.0.gerald2009-03-151-18/+18 * Update to the 20090227 snapshot of GCC 4.4.0.gerald2009-02-281-18/+18 * Update to the 20090220 snapshot of GCC 4.4.0.gerald2009-02-211-18/+18 * Update to the 20090213 snapshot of GCC 4.4.0.gerald2009-02-151-18/+18 * Update to the 20090130 snapshot of GCC 4.4.0.gerald2009-02-011-18/+18 * Update to the 20090123 snapshot of GCC 4.4.0.gerald2009-01-241-18/+18 * Update to the 20090116 snapshot of GCC 4.4.0.gerald2009-01-181-18/+18 * Update to the 20090109 snapshot of GCC 4.4.0.gerald2009-01-111-18/+18 * Update to the 20090102 snapshot of GCC 4.4.0.gerald2009-01-041-18/+18 * Update to the 20081226 snapshot of GCC 4.4.0.gerald2008-12-281-18/+18 * Update to the 20081128 snapshot of GCC 4.4.0.gerald2008-12-011-18/+18 * Update to the 20081121 snapshot of GCC 4.4.0.gerald2008-11-231-18/+18 * Update to the 20081107 snapshot of GCC 4.4.0.gerald2008-11-091-18/+18 * Update to the 20081017 snapshot of GCC 4.4.0.gerald2008-10-251-18/+18 * Update to the 20081003 snapshot of GCC 4.4.0.gerald2008-10-051-18/+18 * Update to the 20080926 snapshot of GCC 4.4.0.gerald2008-09-281-18/+18 * Update to the 20080919 snapshot of GCC 4.4.0.gerald2008-09-241-18/+18 * Update to the 20080905 snapshot of GCC 4.4.0.gerald2008-09-071-18/+18 * Update to the 20080822 snapshot of GCC 4.4.0.gerald2008-08-241-18/+18 * Update to the 20080815 snapshot of GCC 4.4.0.gerald2008-08-171-18/+18 * Update to the 20080801 snapshot of GCC 4.4.0.gerald2008-08-041-18/+18 * Update to the 20080725 snapshot of GCC 4.4.0.gerald2008-07-271-18/+18 * Update to the 20080711 snapshot of GCC 4.4.0. Among others, libgcjgerald2008-07-131-18/+18 * Update to the 20080627 snapshot of GCC 4.4.0.gerald2008-06-291-18/+18 * Update to the 20080613 snapshot of GCC 4.4.0.gerald2008-06-151-18/+18 * Update to the 20080606 snapshot of GCC 4.4.0.gerald2008-06-111-18/+18 * Update to the 20080523 snapshot of GCC 4.4.0.gerald2008-05-241-18/+18 * Update to the 20080509 snapshot of GCC 4.4.0.gerald2008-05-111-18/+18 * Update to the 20080502 snapshot of GCC 4.4.0.gerald2008-05-041-18/+18 * Update to the 20080411 snapshot of GCC 4.4.0.gerald2008-04-131-18/+18 * Update to the 20080328 snapshot of GCC 4.4.0.gerald2008-03-301-18/+18 * Update to the 20080321 snapshot of GCC 4.4.0.gerald2008-03-231-18/+18 * Update to the 20080314 snapshot of GCC 4.4.0.gerald2008-03-181-18/+18 * Update to the 20080307 snapshot of GCC 4.4. Very early alpha, take care!gerald2008-03-081-18/+18 * Now track GCC 4.4 development (currently at 4.4.0 snapshot 20080229) viagerald2008-03-021-18/+18 * Update to the 20080221 snapshot of GCC 4.3.0.gerald2008-02-221-18/+18 * Update to the 20080215 snapshot of GCC 4.3.0.gerald2008-02-171-18/+18 * Update to the 20080208 snapshot of GCC 4.3.0.gerald2008-02-111-18/+18 * Update to the 20080201 snapshot of GCC 4.3.0.gerald2008-02-031-18/+18 * Update to the 20080125 snapshot of GCC 4.3.0.gerald2008-01-271-18/+18 * Update to the 20080118 snapshot of GCC 4.3.0.gerald2008-01-201-18/+18 * Update to the 20080111 snapshot of GCC 4.3.0.gerald2008-01-121-18/+18 * Update to the 20080104 snapshot of GCC 4.3.0.gerald2008-01-061-18/+18 * Update to the 20071221 snapshot of GCC 4.3.0.gerald2007-12-261-18/+18 * Update to the 20071026 snapshot of GCC 4.3.0.gerald2007-10-271-18/+18 * Update to the 20071019 snapshot of GCC 4.3.0.gerald2007-10-201-18/+18 * Update to the 20071012 snapshot of GCC 4.3.0.gerald2007-10-141-18/+18 * Update to the 20070928 snapshot of GCC 4.3.0.gerald2007-09-291-18/+18 * Update to the 20070914 snapshot of GCC 4.3.0.gerald2007-09-161-18/+18 * Update to the 20070831 snapshot of GCC 4.3.0.gerald2007-09-031-18/+18 * Update to the 20070817 snapshot of GCC 4.3.0.gerald2007-08-201-18/+18 * Update to the 20070810 snapshot of GCC 4.3.0.gerald2007-08-121-18/+18 * Update to the 20070727 snapshot of GCC 4.3.0.gerald2007-07-291-18/+18 * Update to the 20070720 snapshot of GCC 4.3.0.gerald2007-07-221-18/+18 * Update to the 20070713 snapshot of GCC 4.3.0.gerald2007-07-151-18/+18 * Update to the 20070622 snapshot of GCC 4.3.0.gerald2007-06-251-18/+18 * Update to the 20070601 snapshot of GCC 4.3.0.gerald2007-06-021-18/+18 * Update to the 20070518 snapshot of GCC 4.3.0 (since this week's one isgerald2007-05-281-18/+18 * Update to the 20070427 snapshot of GCC 4.3.0.gerald2007-04-281-18/+18 * Update to the 20070420 snapshot of GCC 4.3.0.gerald2007-04-211-18/+18 * Update to the 20070413 snapshot of GCC 4.3.0.gerald2007-04-14