diff options
author | Thierry Reding <treding@nvidia.com> | 2014-07-11 14:33:22 +0200 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2014-11-07 17:13:15 +0100 |
commit | b3801fe58bf1d2de018d435dd1c7dea554917e3c (patch) | |
tree | d8f9a6f1401df5eb86583efc8b9f77922111e113 | |
parent | faadf4ca7bce1f02dbf1f1ff8ce2a6d4820c1363 (diff) | |
download | maint-scripts-b3801fe58bf1d2de018d435dd1c7dea554917e3c.tar.gz |
Add pull-linux-tegra.sh script
This script is useful to reproduce the remote branch hierarchy described
in the tegra-branches.sh.dot file in the working copy.
Signed-off-by: Thierry Reding <treding@nvidia.com>
-rwxr-xr-x | pull-linux-tegra.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/pull-linux-tegra.sh b/pull-linux-tegra.sh new file mode 100755 index 0000000..fc35520 --- /dev/null +++ b/pull-linux-tegra.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +set -e +set -x + +. "${0%/*}/tegra-branches.sh.dot" +. "${0%/*}/lib.sh" + +remote=$(get_remote) + +git fetch $remote + +for b in ${branches} for-next; do + if ! git rev-parse ${b} > /dev/null 2>&1; then + git branch ${b} ${remote}/${b} + else + git checkout ${b} + git reset --hard ${remote}/${b} + fi +done |