More portable she-bangs.

This commit is contained in:
hemanth.hm 2014-11-30 17:47:26 +05:30
parent e7e6c96f3e
commit 7b7913fab1
36 changed files with 36 additions and 36 deletions

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
case $# in
0) git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /' | sort ;;

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
if test $# -eq 0; then
git reset --soft HEAD~1

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
if test "$1" = "finish"; then
test -z $2 && echo "bug <name> required." 1>&2 && exit 1

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
FILE=""
LIST=false

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
SINCE="last week"
test $# -ne 0 && SINCE=$@

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
user="$*"

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
if test "$1" = "--all"; then
git shortlog -n -s $@ | awk '{print substr($0,index($0,$2)) " (" $1 ")"}'

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
branch=$1
test -z $branch && echo "branch required." 1>&2 && exit 1

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
# Assert there is at least one branch provided
test -z $1 && echo "branch required." 1>&2 && exit 1

View file

@ -1,3 +1,3 @@
#!/bin/sh
#!/usr/bin/env bash
git branch --merged | grep -v "\*" | grep -v master | xargs -n 1 git branch -d

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
submodule=$1

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
# Assert there is at least one tag provided
test -z $1 && echo "tag required." 1>&2 && exit 1

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
VERSION="2.2.0"

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
if test "$1" = "finish"; then
test -z $2 && echo "feature <name> required." 1>&2 && exit 1

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
branch=$1

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
echo 'setting up gh-pages'
git symbolic-ref HEAD refs/heads/gh-pages \

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
src=$1
dst=$2

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
get_config() {
git config --list

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
ref=$(git symbolic-ref HEAD)
branch=${ref#refs/heads/}

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
filename=$1
test -z $filename && echo "filename required." 1>&2 && exit 1

View file

@ -1,3 +1,3 @@
#!/bin/sh
#!/usr/bin/env bash
git ls-files -v | grep ^S | sed -e 's|S ||'

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
# grab first two non-option arguments
for arg in $*; do

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
file="$1"
test -z "$file" && echo "file required." 1>&2 && exit 1
git filter-branch -f --index-filter "git rm -r --cached '$file' --ignore-unmatch" --prune-empty --tag-name-filter cat -- --all

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
# Based on https://gist.github.com/gnarf/5406589
if test "$1" = "clean"; then

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
# Warn on a dirty work tree.
git rev-parse --verify HEAD >/dev/null || exit 1

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
# Removed unnecessary git checkout for bug, feature and refactor
if test "$1" = "finish"; then

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
old=$1
new=$2

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
file="$1"
commit="$2"

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
git_root() {
git rev-parse --show-toplevel

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
gitdirexists(){
if [ -d ".git" ]; then

View file

@ -1,3 +1,3 @@
#!/bin/sh
#!/usr/bin/env bash
git log --all --graph --decorate --oneline --simplify-by-decoration

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
src="$1"
msg="$2"

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
commit=""
test $# -ne 0 && commit=$@

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
filename="$*"

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
back="^"

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
filename=$1
test -z $filename && echo "filename required." 1>&2 && exit 1