usr/src/cmd/postgres/postgresql-8.4/install-sfw-64
author Jon Tibble <meths@btinternet.com>
Mon, 04 May 2015 14:04:39 +0100
branchoi_151a
changeset 254 9c2a4ac793f0
parent 1 37d545eabfea
permissions -rw-r--r--
Bash patch catchup including shellshock
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     1
#!/bin/sh
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     2
#
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     3
# CDDL HEADER START
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     4
#
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     5
# The contents of this file are subject to the terms of the
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     6
# Common Development and Distribution License (the "License").
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     7
# You may not use this file except in compliance with the License.
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     8
#
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     9
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    10
# or http://www.opensolaris.org/os/licensing.
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    11
# See the License for the specific language governing permissions
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    12
# and limitations under the License.
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    13
#
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    14
# When distributing Covered Code, include this CDDL HEADER in each
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    15
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    16
# If applicable, add the following below this CDDL HEADER, with the
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    17
# fields enclosed by brackets "[]" replaced with your own identifying
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    18
# information: Portions Copyright [yyyy] [name of copyright owner]
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    19
#
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    20
# CDDL HEADER END
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    21
#
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    22
# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    23
# Use is subject to license terms.
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    24
#
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    25
#ident	"@(#)install-sfw-64	1.1	09/10/13 SMI"
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    26
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    27
. ${SRC}/tools/install.subr
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    28
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    29
# functions - search for "START HERE" to find start of control flow
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    30
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    31
install_dir() {
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    32
	dstdir=$1
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    33
	mode=$2
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    34
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    35
	mkdir -p $dstdir
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    36
	chmod $mode $dstdir
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    37
}
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    38
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    39
nuke_archive_libs() {
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    40
	for i in \
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    41
		libecpg.a \
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    42
		libecpg_compat.a \
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    43
		libpgport.a \
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    44
		libpgtypes.a \
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    45
		libpq.a
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    46
	do
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    47
		rm -f ${LIBDIR}/${i}
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    48
	done
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    49
}
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    50
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    51
# START HERE - actual script processing starts here
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    52
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    53
POSTGRES_VERSION=$1	# passed in from Makefile.sfw
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    54
SRCDIR=$2
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    55
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    56
# install locations
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    57
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    58
PREFIX=${ROOT}/usr/postgres/$POSTGRES_VERSION
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    59
BINDIR=${PREFIX}/bin/${MACH64}
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    60
LIBDIR=${PREFIX}/lib/${MACH64}
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    61
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    62
nuke_archive_libs
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    63
37d545eabfea Import b127
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    64
exit 0