git-crup 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/usr/bin/env bash
  2. # Copyright (c) 2012 The Chromium 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. TOPLEVEL=$(git rev-parse --show-toplevel)
  6. TOPPERLEVEL=$(dirname $TOPLEVEL)
  7. cat <<EOF
  8. Sorry `whoami`, but the git-submodule flow has been deprecated in order to
  9. simplify the plethora of SCM choices, and to pave the way towards a git-only
  10. chromium development flow.
  11. Please consult https://code.google.com/p/chromium/wiki/UsingGitSubmodules#Convert_from_submodules_to_gclient
  12. for instructions on how to convert your submodule checkout to gclient.
  13. The simplest chromium and/or blink instructions follow for convenience.
  14. 1. Make sure the parent directory of this checkout is empty, besides this repo:
  15. $ ls $TOPPERLEVEL
  16. EOF
  17. ls "$TOPPERLEVEL"
  18. if [[ "$(ls "$TOPPERLEVEL")" != 'src' ]]
  19. then
  20. echo Please move this repo to its own directory before continuing!!!
  21. fi
  22. echo
  23. cat <<EOF
  24. 2. Please add a .gclient file to $TOPPERLEVEL/.gclient of the form:
  25. # ======== .gclient begins =========
  26. solutions = [{
  27. 'name': '$(basename "$TOPLEVEL")',
  28. 'url': 'https://chromium.googlesource.com/chromium/src.git',
  29. 'managed': False,
  30. 'deps_file': '.DEPS.git',
  31. # Uncomment the following if you're doing blink development
  32. # 'custom_vars': {'webkit_rev': ''},
  33. }]
  34. # ======== .gclient ends =========
  35. 3. Run \`gclient sync\` to synchronize dependencies in your checkout instead of $(basename "$0")!
  36. EOF
  37. exit 1