make/devkit/createMacosxDevkit.sh
author darcy
Wed, 25 Sep 2019 13:37:42 -0700
changeset 58344 d29f0181ba42
parent 53993 271f75d4b494
permissions -rw-r--r--
8231443: Add java.io.Serial to list of platform annotations for annotation processing Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
48755
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
     1
#!/bin/bash
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
     2
#
53993
271f75d4b494 8219986: Change to Xcode 10.1 for building on Macosx at Oracle
erikj
parents: 48755
diff changeset
     3
# Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
48755
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
     4
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
     5
#
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
     6
# This code is free software; you can redistribute it and/or modify it
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
     7
# under the terms of the GNU General Public License version 2 only, as
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
     8
# published by the Free Software Foundation.  Oracle designates this
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
     9
# particular file as subject to the "Classpath" exception as provided
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    10
# by Oracle in the LICENSE file that accompanied this code.
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    11
#
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    12
# This code is distributed in the hope that it will be useful, but WITHOUT
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    13
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    14
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    15
# version 2 for more details (a copy is included in the LICENSE file that
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    16
# accompanied this code).
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    17
#
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    18
# You should have received a copy of the GNU General Public License version
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    19
# 2 along with this work; if not, write to the Free Software Foundation,
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    20
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    21
#
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    22
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    23
# or visit www.oracle.com if you need additional information or have any
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    24
# questions.
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    25
#
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    26
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    27
# This script copies parts of an Xcode installation into a devkit suitable
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    28
# for building OpenJDK and OracleJDK. The installation Xcode_X.X.xip needs
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    29
# to be either installed or extracted using for example Archive Utility.
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    30
# The easiest way to accomplish this is to right click the file in Finder
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    31
# and choose "Open With -> Archive Utility", or possible typing
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    32
# "open Xcode_9.2.xip" in a terminal.
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    33
# erik.joelsson@oracle.com
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    34
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    35
USAGE="$0 <Xcode.app>"
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    36
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    37
if [ "$1" = "" ]; then
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    38
    echo $USAGE
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    39
    exit 1
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    40
fi
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    41
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    42
XCODE_APP="$1"
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    43
XCODE_APP_DIR_NAME="${XCODE_APP##*/}"
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    44
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    45
SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    46
BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    47
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    48
# Find the version of Xcode
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    49
XCODE_VERSION="$($XCODE_APP/Contents/Developer/usr/bin/xcodebuild -version \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    50
    | awk '/Xcode/ { print $2 }' )"
53993
271f75d4b494 8219986: Change to Xcode 10.1 for building on Macosx at Oracle
erikj
parents: 48755
diff changeset
    51
SDK_VERSION="$(ls $XCODE_APP/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs \
271f75d4b494 8219986: Change to Xcode 10.1 for building on Macosx at Oracle
erikj
parents: 48755
diff changeset
    52
    | grep [0-9] | sort -r | head -n1 | sed 's/\.sdk//')"
48755
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    53
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    54
DEVKIT_ROOT="${BUILD_DIR}/Xcode${XCODE_VERSION}-${SDK_VERSION}"
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    55
DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    56
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    57
echo "Xcode version: $XCODE_VERSION"
53993
271f75d4b494 8219986: Change to Xcode 10.1 for building on Macosx at Oracle
erikj
parents: 48755
diff changeset
    58
echo "SDK version: $SDK_VERSION"
48755
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    59
echo "Creating devkit in $DEVKIT_ROOT"
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    60
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    61
mkdir -p $DEVKIT_ROOT
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    62
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    63
################################################################################
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    64
# Copy the relevant parts of Xcode.app, removing things that are both big and
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    65
# unecessary for our purposes, without building an impossibly long exclude list.
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    66
#
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    67
# Not including WatchSimulator.platform makes ibtool crashes in some situations.
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    68
# It doesn't seem to matter which extra platform is included, but that is the
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    69
# smallest one.
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    70
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    71
EXCLUDE_DIRS=" \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    72
    Contents/_CodeSignature \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    73
    $XCODE_APP_DIR_NAME/Contents/Applications \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    74
    $XCODE_APP_DIR_NAME/Contents/Resources \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    75
    $XCODE_APP_DIR_NAME/Contents/Library \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    76
    $XCODE_APP_DIR_NAME/Contents/XPCServices \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    77
    $XCODE_APP_DIR_NAME/Contents/OtherFrameworks \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    78
    $XCODE_APP_DIR_NAME/Contents/Developer/Documentation \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    79
    $XCODE_APP_DIR_NAME/Contents/Developer/usr/share \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    80
    $XCODE_APP_DIR_NAME/Contents/Developer/usr/libexec/git-core \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    81
    $XCODE_APP_DIR_NAME/Contents/Developer/usr/bin/git* \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    82
    $XCODE_APP_DIR_NAME/Contents/Developer/usr/bin/svn* \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    83
    $XCODE_APP_DIR_NAME/Contents/Developer/usr/lib/libgit* \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    84
    $XCODE_APP_DIR_NAME/Contents/Developer/usr/lib/libsvn* \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    85
    $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/share/man \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    86
    $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/${SDK_VERSION}.sdk/usr/share/man \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    87
    $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/share/man \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    88
    $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/usr \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    89
    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    90
    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift* \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    91
    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift* \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    92
    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/sourcekitd.framework \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    93
    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec/swift* \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    94
    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/swift* \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    95
    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/arc \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    96
    Platforms/AppleTVSimulator.platform \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    97
    Platforms/iPhoneSimulator.platform \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    98
    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/LLDB.framework \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    99
    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/ModelIO.framework \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   100
    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/XCSUI.framework \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   101
    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/SceneKit.framework \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   102
    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/XCBuild.framework \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   103
    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/GPUTools.framework \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   104
    $(cd $XCODE_APP/.. && ls -d $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/* \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   105
        | grep -v MacOSX.platform | grep -v WatchSimulator.platform) \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   106
"
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   107
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   108
for ex in $EXCLUDE_DIRS; do
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   109
    EXCLUDE_ARGS+="--exclude=$ex "
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   110
done
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   111
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   112
echo "Copying Xcode.app..."
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   113
echo rsync -rlH $INCLUDE_ARGS $EXCLUDE_ARGS "$XCODE_APP" $DEVKIT_ROOT/
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   114
rsync -rlH $INCLUDE_ARGS $EXCLUDE_ARGS "$XCODE_APP" $DEVKIT_ROOT/
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   115
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   116
################################################################################
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   117
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   118
echo-info() {
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   119
    echo "$1" >> $DEVKIT_ROOT/devkit.info
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   120
}
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   121
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   122
echo "Generating devkit.info..."
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   123
rm -f $DEVKIT_ROOT/devkit.info
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   124
echo-info "# This file describes to configure how to interpret the contents of this devkit"
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   125
echo-info "DEVKIT_NAME=\"Xcode $XCODE_VERSION (devkit)\""
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   126
echo-info "DEVKIT_TOOLCHAIN_PATH=\"\$DEVKIT_ROOT/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:\$DEVKIT_ROOT/Xcode.app/Contents/Developer/usr/bin\""
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   127
echo-info "DEVKIT_SYSROOT=\"\$DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/$SDK_VERSION.sdk\""
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   128
echo-info "DEVKIT_EXTRA_PATH=\"\$DEVKIT_TOOLCHAIN_PATH\""
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   129
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   130
################################################################################
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   131
# Copy this script
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   132
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   133
echo "Copying this script..."
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   134
cp $0 $DEVKIT_ROOT/
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   135
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   136
################################################################################
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   137
# Create bundle
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   138
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   139
echo "Creating bundle..."
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   140
GZIP=$(command -v pigz)
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   141
if [ -z "$GZIP" ]; then
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   142
    GZIP="gzip"
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   143
fi
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   144
(cd $DEVKIT_ROOT && tar c - . | $GZIP - > "$DEVKIT_BUNDLE")