Skip to content

Commit

Permalink
chore: Use /usr/bin/env bash for Bash shebang
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperupcall committed Jan 14, 2023
1 parent 371f308 commit 352d330
Show file tree
Hide file tree
Showing 46 changed files with 46 additions and 46 deletions.
2 changes: 1 addition & 1 deletion git-addsub
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# This script makes it much easier to add new submodules

Expand Down
2 changes: 1 addition & 1 deletion git-addtree
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
#!/usr/bin/env bash
git subtree add --prefix $1 ext/$(basename $1) master --squash
2 changes: 1 addition & 1 deletion git-all-objects
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
shopt -s nullglob extglob

Expand Down
2 changes: 1 addition & 1 deletion git-already-merged
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# From https://railsware.com/blog/git-housekeeping-tutorial-clean-up-outdated-branches-in-local-and-remote-repositories/

Expand Down
2 changes: 1 addition & 1 deletion git-archive-all
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Super basic tool to export repo and all submodules
# as a single zip file
Expand Down
2 changes: 1 addition & 1 deletion git-branch-done
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# git branch-done <branch>

# destination branch as parameter - depends on merge strategy, typically master
Expand Down
2 changes: 1 addition & 1 deletion git-build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

git clean -f -x -d
git checkout $1
Expand Down
2 changes: 1 addition & 1 deletion git-children-of
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

commit=$1
branch=$2
Expand Down
2 changes: 1 addition & 1 deletion git-clone.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# this script clones a repository, including all its remote branches
# Author: julianromera
Expand Down
2 changes: 1 addition & 1 deletion git-cmpdir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

stat=false
if [[ "$1" == "--stat" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion git-current
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

if [[ -z "$1" ]]; then
ancestor=master
Expand Down
2 changes: 1 addition & 1 deletion git-current-branch
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
#!/usr/bin/env bash
git rev-parse --abbrev-ref HEAD
2 changes: 1 addition & 1 deletion git-diff-directory
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

stat=true
if [[ "$1" == "-p" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion git-discover-large-blobs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#set -x

# Shows you the largest objects in your repo's pack file.
Expand Down
2 changes: 1 addition & 1 deletion git-each
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

DIRS="."
Expand Down
2 changes: 1 addition & 1 deletion git-every
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
#!/usr/bin/env bash
exec find . -name .git -type d -exec git --git-dir="{}" "$@" \;
2 changes: 1 addition & 1 deletion git-fetch-github
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
#!/usr/bin/env bash
REMOTE=${1:-origin}
git config remote.${REMOTE}.fetch "+refs/pull/*:refs/remotes/${REMOTE}/pr/*"
2 changes: 1 addition & 1 deletion git-find-children
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

if [[ $# == 0 ]]; then
echo usage: git find-children REFS...
Expand Down
2 changes: 1 addition & 1 deletion git-find-fetch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# usage: git-find-fetch [--mirror] [--repack] DIRS...
#
Expand Down
2 changes: 1 addition & 1 deletion git-find-useful-dangling-trees
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
depth=${1:-all} # 'all' or number of depth

for i in $(git fsck --unreachable | egrep 'tree|commit' | cut -d\ -f3)
Expand Down
2 changes: 1 addition & 1 deletion git-fix-wt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

find . -name config -type f -print0 \
| xargs -0 perl -i -ne 'print unless /worktree =/;'
2 changes: 1 addition & 1 deletion git-fixws
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# If you are using MacPorts, you'll need to install 'patchutils'

Expand Down
2 changes: 1 addition & 1 deletion git-hunt-and-seek
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

for hash in $(grep ^commit | awk '{print $2}'); do
git diff-directory $1 $hash
Expand Down
2 changes: 1 addition & 1 deletion git-ignore-wizard
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# take a file/directory as arg1, to be added to ignore rules.
# the user selects which ignore rules using dmenu
# in the .gitconfig case, we should probably allow the user to edit it,
Expand Down
2 changes: 1 addition & 1 deletion git-interactive-merge
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
if [ -z "$1" -o -z "$2" ]
then
echo "usage: $0 <from> <to>" >&2
Expand Down
2 changes: 1 addition & 1 deletion git-link-upstream
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

BRANCH=$(git-current-branch)

Expand Down
2 changes: 1 addition & 1 deletion git-master
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
git stash
git co master
git stash pop
2 changes: 1 addition & 1 deletion git-merge-to
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# git merge-to <branch>

# destination branch as parameter - depends on merge strategy, typically release
Expand Down
2 changes: 1 addition & 1 deletion git-publish
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

SERVER=$1
PATHNAME=$2
Expand Down
2 changes: 1 addition & 1 deletion git-pulltree
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
#!/usr/bin/env bash
git subtree pull --prefix $1 ext/$(basename $1) master --squash
2 changes: 1 addition & 1 deletion git-pushtree
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
#!/usr/bin/env bash
git subtree push --prefix $1 fork/$(basename $1) master
2 changes: 1 addition & 1 deletion git-rebase-master
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
git checkout master
git pull --ff-only
Expand Down
2 changes: 1 addition & 1 deletion git-rebranch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
newbranch=$1
remote=${2:-origin/master}
Expand Down
2 changes: 1 addition & 1 deletion git-release
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# git release <branch>

# destination branch as parameter - depends on merge strategy, typically release
Expand Down
2 changes: 1 addition & 1 deletion git-remote-in-sync.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# checks if the specified remote(s) are in sync with what we have
# in other words: do we have anything which is not at the remote?
# Any commit, tag, branch, dirty WC/index or stashed state?
Expand Down
2 changes: 1 addition & 1 deletion git-remove-empty-commits
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
#!/usr/bin/env bash
git filter-branch --commit-filter 'if [ z$1 = z`git rev-parse $3^{tree}` ]; then skip_commit "$@"; else git commit-tree "$@"; fi' "$@"
2 changes: 1 addition & 1 deletion git-rm-conflicts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# git-rm-conflicts, version 1.3
#
Expand Down
2 changes: 1 addition & 1 deletion git-save
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# To be used with the git-save-* scripts @ https://github.com/jwiegley/git-scripts
mypath=$(dirname $0)
Expand Down
2 changes: 1 addition & 1 deletion git-signed-tag
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
#!/usr/bin/env bash

git tag -s -m "$1" $1 $2
2 changes: 1 addition & 1 deletion git-smerge
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

current=$(git symbolic-ref HEAD | sed 's%refs/heads/%%')
branch=$1
Expand Down
2 changes: 1 addition & 1 deletion git-stale-branches
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

if ! git config --get-all remote.origin.fetch | grep -q '/pr/'; then
git config --add remote.origin.fetch '+refs/pull/*:refs/remotes/origin/pr/*'
Expand Down
2 changes: 1 addition & 1 deletion git-sync
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

DIRS="$@"
if [[ -z "$DIRS" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion git-tag-diff
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Show the differences between local tags and ones on the remote, if any
# (defaults to origin, but another remote may be specified on the commandline)

Expand Down
2 changes: 1 addition & 1 deletion git-touch-repos
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

export GIT_DIR

Expand Down
2 changes: 1 addition & 1 deletion git-undo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

cmd=$1
shift 1
Expand Down
2 changes: 1 addition & 1 deletion git-working-tree
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Set contents of the working tree equal to TREEISH

Expand Down

0 comments on commit 352d330

Please sign in to comment.