Skip to content

Commit ec238db

Browse files
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
1 parent 5839eb5 commit ec238db

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+60
-57
lines changed

git-cache

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

git-cl

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

git-crsync

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
. git-crup

git-crup

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

git-freeze

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

git-lkgr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
44
# Use of this source code is governed by a BSD-style license that can be

git-map

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2014 The Chromium Authors. All rights reserved.
33
# Use of this source code is governed by a BSD-style license that can be
44
# found in the LICENSE file.
55

66
# git_map.py -- a git-command for presenting a graphical view of the git
77
# history.
88

9-
. $(type -P python_git_runner.sh) | less -R
9+
. $(type -P python_git_runner.sh) | less -R

git-map-branches

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

git-mark-merge-base

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

git-nav-downstream

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

git-nav-upstream

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

git-new-branch

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

git-number

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

git-rebase-update

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2014 The Chromium Authors. All rights reserved.
33
# Use of this source code is governed by a BSD-style license that can be
44
# found in the LICENSE file.
55

66
# git_rebase_update.py -- Update remote sources, and use rebase to update all
77
# branches in this repo.
88

9-
. $(type -P python_git_runner.sh)
9+
. $(type -P python_git_runner.sh)

git-rename-branch

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

git-reparent-branch

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2014 The Chromium Authors. All rights reserved.
33
# Use of this source code is governed by a BSD-style license that can be
44
# found in the LICENSE file.
@@ -7,4 +7,4 @@
77
# branch. Afterwards, run a `git rebase-update` cycle to ensure that all
88
# branches correctly reflect their parentage.
99

10-
. $(type -P python_git_runner.sh)
10+
. $(type -P python_git_runner.sh)

git-runhooks

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
while test "$PWD" != "/"; do
44
if test -f "$PWD/src/.gitmodules"; then

git-squash-branch

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2014 The Chromium Authors. All rights reserved.
33
# Use of this source code is governed by a BSD-style license that can be
44
# found in the LICENSE file.
55

66
# git_squash_branch.py -- Collapses the current branch to a single commit.
77

8-
. $(type -P python_git_runner.sh)
8+
. $(type -P python_git_runner.sh)

git-thaw

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

git-try

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

git-upstream-diff

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

man/push_to_gs.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
MY_DIR=$(dirname "$(readlink "$0")")
44
gsutil cp -r -z html -a public-read "$MY_DIR/html" gs://chrome-infra-docs/flat/depot_tools/docs/

man/src/common_demo_functions.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
REMOTE=$(pwd)/demo_repo
44

man/src/demo_repo.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
. common_demo_functions.sh
44

man/src/depot_tools_tutorial.demo.walkthrough.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
BLANK_DEMO=1
33
. demo_repo.sh
44

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
. demo_repo.sh
33

44
add deleted_file

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
. demo_repo.sh
33

44
silent git branch no_upstream HEAD~

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
. demo_repo.sh
33
run git map

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
. demo_repo.sh
33

44
silent git checkout origin/master

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
. demo_repo.sh
33

44
silent git checkout subfeature

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
. demo_repo.sh
33

44
run git map-branches

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
. demo_repo.sh
33

44
run git map

man/src/make_docs.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
25
shopt -s nullglob
36

47
cd $(dirname "$0")

man/src/prep_demo_repo.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
NO_AUTOPREP=True
44
. common_demo_functions.sh

ninja

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Copyright (c) 2012 Google Inc. All rights reserved.
44
# Use of this source code is governed by a BSD-style license that can be

testing_support/gerrit-init.sh

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

tests/abandon.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
44
# Use of this source code is governed by a BSD-style license that can be

tests/basic.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
44
# Use of this source code is governed by a BSD-style license that can be

tests/hooks.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
44
# Use of this source code is governed by a BSD-style license that can be

tests/owners.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
44
# Use of this source code is governed by a BSD-style license that can be

tests/patch.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
44
# Use of this source code is governed by a BSD-style license that can be

tests/post-dcommit-hook-test.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
44
# Use of this source code is governed by a BSD-style license that can be
@@ -16,7 +16,7 @@ setup_gitsvn
1616
cd git-svn
1717

1818
cat > .git/hooks/post-cl-dcommit << _EOF
19-
#!/bin/bash
19+
#!/usr/bin/env bash
2020
git branch -m COMMITTED
2121
_EOF
2222
chmod +x .git/hooks/post-cl-dcommit

tests/push-basic.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
44
# Use of this source code is governed by a BSD-style license that can be

tests/push-from-logs.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
44
# Use of this source code is governed by a BSD-style license that can be

tests/rename.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
44
# Use of this source code is governed by a BSD-style license that can be

tests/save-description-on-failure.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
44
# Use of this source code is governed by a BSD-style license that can be

tests/submit-from-new-dir.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
44
# Use of this source code is governed by a BSD-style license that can be

tests/submodule-merge-test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
44
# Use of this source code is governed by a BSD-style license that can be

tests/test-lib.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
44
# Use of this source code is governed by a BSD-style license that can be

tests/upload-local-tracking-branch.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
44
# Use of this source code is governed by a BSD-style license that can be

tests/upload-stale.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
44
# Use of this source code is governed by a BSD-style license that can be

tests/upstream.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
44
# Use of this source code is governed by a BSD-style license that can be

0 commit comments

Comments
 (0)