1# Copyright 2020 Google LLC 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); you may not 4# use this file except in compliance with the License. You may obtain a copy of 5# the License at 6# 7# https://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12# License for the specific language governing permissions and limitations under 13# the License. 14 15# Sets up an environment ready to build and run tests. For example, 'pw watch' 16# should work in this environment. 17# 18# Usage: source bootstrap.sh 19 20# Update submodules, initializing if necessary. This will pin all submodules to 21# the committed revision so don't run this with uncommitted changes in a 22# submodule. By convention, submodules are pinned to an upstream revision and 23# any changes should be submitted upstream. Local changes to submodules are not 24# carried long term, but patches waiting to land upstream may be applied 25# manually. 26git submodule update --init 27 28# Apply local submodule patches. 29git -C third_party/mbedtls/src am ../0001-Mark-basic-constraints-critical-as-appropriate.patch 30 31# Bootstrap the pigweed environment. 32. third_party/pigweed/src/bootstrap.sh 33 34# Setup the build. 35gn gen --export-compile-commands out 36