benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # Copyright 2014 Google Inc. |
| 3 | # |
| 4 | # Use of this source code is governed by a BSD-style license that can be |
| 5 | # found in the LICENSE file. |
| 6 | |
| 7 | # Create a google3 CitC client in which code can be submitted to either google3 |
| 8 | # or Git. |
| 9 | # |
| 10 | # Usage: |
| 11 | # ./tools/create_skia_google3_client.sh <client_name> |
| 12 | |
benjaminwagner | 964eeba | 2015-10-20 13:00:48 -0700 | [diff] [blame^] | 13 | prodcertstatus -q || (echo "Please run prodaccess." 1>&2; exit 1) |
| 14 | source gbash.sh || exit 2 |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 15 | |
benjaminwagner | 964eeba | 2015-10-20 13:00:48 -0700 | [diff] [blame^] | 16 | set -e |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 17 | |
| 18 | CLIENT="$1" |
| 19 | g4 citc "${CLIENT}" |
| 20 | cd "/google/src/cloud/${USER}/${CLIENT}/google3/third_party/skia/HEAD" |
| 21 | |
| 22 | REV="$(cat README.google | grep -e "^Version" | sed "s/^Version: \(.*\)/\1/")" |
| 23 | |
| 24 | MY_DIR="$(gbash::get_absolute_caller_dir)" |
| 25 | ${MY_DIR}/git_clone_to_google3.sh --skia_rev "${REV}" |
benjaminwagner | 964eeba | 2015-10-20 13:00:48 -0700 | [diff] [blame^] | 26 | |
| 27 | echo "Created client ${CLIENT} synced to ${REV}" |