blob: 9dadfa21c0ed4aa1c3ef031a91516efddab8f264 [file] [log] [blame]
#!/bin/bash
# Copyright 2017 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -e
function usage {
cat <<END
usage: bootstrap
Bootstrap the Platform Source Tree.
END
}
if [[ $# -gt 0 ]]; then
usage
exit 1
fi
# The fetched script will
# - create "fuchsia" directory if it does not exist,
# - download "jiri" command to "fuchsia/.jiri_root/bin"
curl -s "https://fuchsia.googlesource.com/jiri/+/HEAD/scripts/bootstrap_jiri?format=TEXT" | base64 --decode | bash -s fuchsia
cd fuchsia
.jiri_root/bin/jiri import -name=integration flower https://fuchsia.googlesource.com/integration
.jiri_root/bin/jiri update -fetch-packages-timeout=120 -hook-timeout=24
echo "Done creating a Platform Source Tree at \"$(pwd)\"."
echo "Recommended: export PATH=\"$(pwd)/.jiri_root/bin:\$PATH\""