#!/bin/bash | |
set -xv | |
fix_sdk_version() { | |
if [[ -f third_party/fuchsia-sdk/meta/manifest.json ]]; then | |
grep '^ "id": ' third_party/fuchsia-sdk/meta/manifest.json | cut --delimiter='"' --fields=4 > sdk.version | |
fi | |
} | |
export -f fix_sdk_version | |
export FILTER_BRANCH_SQUELCH_WARNING=1 | |
git filter-branch --tree-filter \ | |
"fix_sdk_version; rm -rf third_party/fuchsia-sdk" \ | |
--force HEAD |