1 #!/bin/bash 2 # Copyright 2015 The Weave Authors. All rights reserved. 3 # Use of this source code is governed by a BSD-style license that can be 4 # found in the LICENSE file. 5 6 DIR=$(cd -P -- "$(dirname -- "$0")" && pwd -P) 7 ROOT_DIR=$(cd -P -- "$(dirname -- "$0")/../.." && pwd -P) 8 9 cd $ROOT_DIR 10 11 git subtree add --prefix third_party/temp_libuweave \ 12 https://weave.googlesource.com/weave/libuweave master --squash || exit 1 13 14 mkdir -p third_party/libuweave/src 15 pushd third_party 16 git mv -kf temp_libuweave/LICENSE libuweave/ 17 git mv -kf temp_libuweave/src/crypto_hmac.h libuweave/src/crypto_hmac.h 18 git mv -kf temp_libuweave/src/macaroon* libuweave/src/ 19 git mv -kf temp_libuweave/src/crypto_utils.* libuweave/src/ 20 popd 21 22 git rm -rf third_party/temp_libuweave 23 git reset --soft weave/master 24 git commit -av 25