make/devkit/createMacosxDevkit9.sh
author vromero
Wed, 21 Feb 2018 00:29:04 -0500
changeset 48926 02404e27d356
parent 48755 fe377d6591ef
permissions -rw-r--r--
8198479: JDK build is broken by 8194892 Reviewed-by: sundar
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
#
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
     3
# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
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 }' )"
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    51
SDK_VERSION="MacOSX10.13"
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    52
if [ ! -e "$XCODE_APP/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/${SDK_VERSION}.sdk" ]; then
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    53
    echo "Expected SDK version not found: ${SDK_VERSION}"
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    54
    exit 1
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    55
fi
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
DEVKIT_ROOT="${BUILD_DIR}/Xcode${XCODE_VERSION}-${SDK_VERSION}"
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    58
DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    59
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    60
echo "Xcode version: $XCODE_VERSION"
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    61
echo "Creating devkit in $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
mkdir -p $DEVKIT_ROOT
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    64
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    65
################################################################################
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    66
# 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
    67
# 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
    68
#
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    69
# Not including WatchSimulator.platform makes ibtool crashes in some situations.
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    70
# 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
    71
# smallest one.
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    72
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    73
EXCLUDE_DIRS=" \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    74
    Contents/_CodeSignature \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    75
    $XCODE_APP_DIR_NAME/Contents/Applications \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    76
    $XCODE_APP_DIR_NAME/Contents/Resources \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    77
    $XCODE_APP_DIR_NAME/Contents/Library \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    78
    $XCODE_APP_DIR_NAME/Contents/XPCServices \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    79
    $XCODE_APP_DIR_NAME/Contents/OtherFrameworks \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    80
    $XCODE_APP_DIR_NAME/Contents/Developer/Documentation \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    81
    $XCODE_APP_DIR_NAME/Contents/Developer/usr/share \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    82
    $XCODE_APP_DIR_NAME/Contents/Developer/usr/libexec/git-core \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    83
    $XCODE_APP_DIR_NAME/Contents/Developer/usr/bin/git* \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    84
    $XCODE_APP_DIR_NAME/Contents/Developer/usr/bin/svn* \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    85
    $XCODE_APP_DIR_NAME/Contents/Developer/usr/lib/libgit* \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    86
    $XCODE_APP_DIR_NAME/Contents/Developer/usr/lib/libsvn* \
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/SDKs/MacOSX.sdk/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/Developer/SDKs/${SDK_VERSION}.sdk/usr/share/man \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    89
    $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
    90
    $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/usr \
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/share/man \
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/bin/swift* \
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/lib/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/lib/sourcekitd.framework \
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/libexec/swift* \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    96
    $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
    97
    $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
    98
    Platforms/AppleTVSimulator.platform \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
    99
    Platforms/iPhoneSimulator.platform \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   100
    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/LLDB.framework \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   101
    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/ModelIO.framework \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   102
    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/XCSUI.framework \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   103
    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/SceneKit.framework \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   104
    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/XCBuild.framework \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   105
    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/GPUTools.framework \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   106
    $(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
   107
        | grep -v MacOSX.platform | grep -v WatchSimulator.platform) \
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   108
"
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   109
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   110
for ex in $EXCLUDE_DIRS; do
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   111
    EXCLUDE_ARGS+="--exclude=$ex "
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   112
done
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   113
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   114
echo "Copying Xcode.app..."
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   115
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
   116
rsync -rlH $INCLUDE_ARGS $EXCLUDE_ARGS "$XCODE_APP" $DEVKIT_ROOT/
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
################################################################################
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   119
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   120
echo-info() {
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   121
    echo "$1" >> $DEVKIT_ROOT/devkit.info
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   122
}
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   123
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   124
echo "Generating devkit.info..."
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   125
rm -f $DEVKIT_ROOT/devkit.info
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   126
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
   127
echo-info "DEVKIT_NAME=\"Xcode $XCODE_VERSION (devkit)\""
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   128
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
   129
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
   130
echo-info "DEVKIT_EXTRA_PATH=\"\$DEVKIT_TOOLCHAIN_PATH\""
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   131
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
# Copy this script
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   134
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   135
echo "Copying this script..."
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   136
cp $0 $DEVKIT_ROOT/
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   137
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
# Create bundle
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   140
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   141
echo "Creating bundle..."
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   142
GZIP=$(command -v pigz)
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   143
if [ -z "$GZIP" ]; then
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   144
    GZIP="gzip"
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   145
fi
fe377d6591ef 8196895: Create devkit for Macosx with Xcode 9.2
erikj
parents:
diff changeset
   146
(cd $DEVKIT_ROOT && tar c - . | $GZIP - > "$DEVKIT_BUNDLE")