瀏覽代碼

Invoke the bash shell via /usr/bin/env so that these scripts run on operating systems without /bin/bash too.

TEST=run "git cl owners" on FreeBSD
BUG=

Review URL: https://codereview.chromium.org/197213008

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@274320 0039d316-1c4b-4281-b951-d872f2087c98
r.c.ladan@gmail.com 11 年之前
父節點
當前提交
ec238db2ad
共有 52 個文件被更改,包括 60 次插入57 次删除
  1. 1 1
      git-cache
  2. 1 1
      git-cl
  3. 1 1
      git-crsync
  4. 1 1
      git-crup
  5. 1 1
      git-freeze
  6. 1 1
      git-lkgr
  7. 2 2
      git-map
  8. 1 1
      git-map-branches
  9. 1 1
      git-mark-merge-base
  10. 1 1
      git-nav-downstream
  11. 1 1
      git-nav-upstream
  12. 1 1
      git-new-branch
  13. 1 1
      git-number
  14. 2 2
      git-rebase-update
  15. 1 1
      git-rename-branch
  16. 2 2
      git-reparent-branch
  17. 1 1
      git-runhooks
  18. 2 2
      git-squash-branch
  19. 1 1
      git-thaw
  20. 1 1
      git-try
  21. 1 1
      git-upstream-diff
  22. 1 1
      man/push_to_gs.sh
  23. 1 1
      man/src/common_demo_functions.sh
  24. 1 1
      man/src/demo_repo.sh
  25. 1 1
      man/src/depot_tools_tutorial.demo.walkthrough.sh
  26. 1 1
      man/src/git-freeze.demo.1.sh
  27. 1 1
      man/src/git-map-branches.demo.1.sh
  28. 1 1
      man/src/git-map.demo.1.sh
  29. 1 1
      man/src/git-nav-downstream.demo.1.sh
  30. 1 1
      man/src/git-nav-upstream.demo.1.sh
  31. 1 1
      man/src/git-new-branch.demo.1.sh
  32. 1 1
      man/src/git-squash-branch.demo.1.sh
  33. 4 1
      man/src/make_docs.sh
  34. 1 1
      man/src/prep_demo_repo.sh
  35. 1 1
      ninja
  36. 1 1
      testing_support/gerrit-init.sh
  37. 1 1
      tests/abandon.sh
  38. 1 1
      tests/basic.sh
  39. 1 1
      tests/hooks.sh
  40. 1 1
      tests/owners.sh
  41. 1 1
      tests/patch.sh
  42. 2 2
      tests/post-dcommit-hook-test.sh
  43. 1 1
      tests/push-basic.sh
  44. 1 1
      tests/push-from-logs.sh
  45. 1 1
      tests/rename.sh
  46. 1 1
      tests/save-description-on-failure.sh
  47. 1 1
      tests/submit-from-new-dir.sh
  48. 1 1
      tests/submodule-merge-test.sh
  49. 1 1
      tests/test-lib.sh
  50. 1 1
      tests/upload-local-tracking-branch.sh
  51. 1 1
      tests/upload-stale.sh
  52. 1 1
      tests/upstream.sh

+ 1 - 1
git-cache

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # Copyright 2014 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.

+ 1 - 1
git-cl

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # Copyright (c) 2014 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.

+ 1 - 1
git-crsync

@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 . git-crup

+ 1 - 1
git-crup

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.

+ 1 - 1
git-freeze

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # Copyright 2014 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.

+ 1 - 1
git-lkgr

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be

+ 2 - 2
git-map

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # Copyright 2014 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
@@ -6,4 +6,4 @@
 # git_map.py -- a git-command for presenting a graphical view of the git
 # history.
 
-. $(type -P python_git_runner.sh) | less -R
+. $(type -P python_git_runner.sh) | less -R

+ 1 - 1
git-map-branches

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # Copyright 2014 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.

+ 1 - 1
git-mark-merge-base

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # Copyright 2014 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.

+ 1 - 1
git-nav-downstream

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # Copyright 2014 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.

+ 1 - 1
git-nav-upstream

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # Copyright 2014 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.

+ 1 - 1
git-new-branch

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # Copyright 2014 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.

+ 1 - 1
git-number

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # Copyright 2013 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.

+ 2 - 2
git-rebase-update

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # Copyright 2014 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
@@ -6,4 +6,4 @@
 # git_rebase_update.py -- Update remote sources, and use rebase to update all
 # branches in this repo.
 
-. $(type -P python_git_runner.sh)
+. $(type -P python_git_runner.sh)

+ 1 - 1
git-rename-branch

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # Copyright 2014 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.

+ 2 - 2
git-reparent-branch

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # Copyright 2014 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
@@ -7,4 +7,4 @@
 # branch. Afterwards, run a `git rebase-update` cycle to ensure that all
 # branches correctly reflect their parentage.
 
-. $(type -P python_git_runner.sh)
+. $(type -P python_git_runner.sh)

+ 1 - 1
git-runhooks

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 while test "$PWD" != "/"; do
   if test -f "$PWD/src/.gitmodules"; then

+ 2 - 2
git-squash-branch

@@ -1,8 +1,8 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # Copyright 2014 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
 # git_squash_branch.py -- Collapses the current branch to a single commit.
 
-. $(type -P python_git_runner.sh)
+. $(type -P python_git_runner.sh)

+ 1 - 1
git-thaw

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # Copyright 2014 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.

+ 1 - 1
git-try

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.

+ 1 - 1
git-upstream-diff

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # Copyright 2014 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.

+ 1 - 1
man/push_to_gs.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 MY_DIR=$(dirname "$(readlink "$0")")
 gsutil cp -r -z html -a public-read  "$MY_DIR/html" gs://chrome-infra-docs/flat/depot_tools/docs/

+ 1 - 1
man/src/common_demo_functions.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 REMOTE=$(pwd)/demo_repo
 

+ 1 - 1
man/src/demo_repo.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 . common_demo_functions.sh
 

+ 1 - 1
man/src/depot_tools_tutorial.demo.walkthrough.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 BLANK_DEMO=1
 . demo_repo.sh
 

+ 1 - 1
man/src/git-freeze.demo.1.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 . demo_repo.sh
 
 add deleted_file

+ 1 - 1
man/src/git-map-branches.demo.1.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 . demo_repo.sh
 
 silent git branch no_upstream HEAD~

+ 1 - 1
man/src/git-map.demo.1.sh

@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/usr/bin/env bash
 . demo_repo.sh
 run git map

+ 1 - 1
man/src/git-nav-downstream.demo.1.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 . demo_repo.sh
 
 silent git checkout origin/master

+ 1 - 1
man/src/git-nav-upstream.demo.1.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 . demo_repo.sh
 
 silent git checkout subfeature

+ 1 - 1
man/src/git-new-branch.demo.1.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 . demo_repo.sh
 
 run git map-branches

+ 1 - 1
man/src/git-squash-branch.demo.1.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 . demo_repo.sh
 
 run git map

+ 4 - 1
man/src/make_docs.sh

@@ -1,4 +1,7 @@
-#!/bin/bash -e
+#!/usr/bin/env bash
+
+set -e
+
 shopt -s nullglob
 
 cd $(dirname "$0")

+ 1 - 1
man/src/prep_demo_repo.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 NO_AUTOPREP=True
 . common_demo_functions.sh

+ 1 - 1
ninja

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # Copyright (c) 2012 Google Inc. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be

+ 1 - 1
testing_support/gerrit-init.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.

+ 1 - 1
tests/abandon.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be

+ 1 - 1
tests/basic.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be

+ 1 - 1
tests/hooks.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be

+ 1 - 1
tests/owners.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be

+ 1 - 1
tests/patch.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be

+ 2 - 2
tests/post-dcommit-hook-test.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
@@ -16,7 +16,7 @@ setup_gitsvn
   cd git-svn
 
   cat > .git/hooks/post-cl-dcommit << _EOF
-#!/bin/bash
+#!/usr/bin/env bash
 git branch -m COMMITTED
 _EOF
   chmod +x .git/hooks/post-cl-dcommit

+ 1 - 1
tests/push-basic.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be

+ 1 - 1
tests/push-from-logs.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be

+ 1 - 1
tests/rename.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be

+ 1 - 1
tests/save-description-on-failure.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be

+ 1 - 1
tests/submit-from-new-dir.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be

+ 1 - 1
tests/submodule-merge-test.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be

+ 1 - 1
tests/test-lib.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be

+ 1 - 1
tests/upload-local-tracking-branch.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be

+ 1 - 1
tests/upload-stale.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be

+ 1 - 1
tests/upstream.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be