diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index af100e7..70386c2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,14 +4,14 @@ * Bash 3.2+ (If you aren't sure, see [the Bash changelog](http://tldp.org/LDP/abs/html/bash2.html)) * Git 2.1+ -*If you aren't able to test your new command on a platform, +*If you aren't able to test your new command on a platform, make that clear in your PR and someone else may be able to test it on their system. ## To submit a new command, you should Let's assume your new command is named `foo`. -1. Write a bash script under `./bin` called `git-foo`. +1. Write a bash script under `./bin` called `git-foo`. The script should be started with `#!/usr/bin/env bash`. 2. Read `./man/Readme.md` and write documentation for `git-foo`. 3. Don't forget to introduce it in `Commands.md`. 4. Update `./etc/git-extras-completion.zsh`. Just follow existing code. diff --git a/check_integrity.sh b/check_integrity.sh index 3a68751..0814f85 100755 --- a/check_integrity.sh +++ b/check_integrity.sh @@ -5,6 +5,10 @@ err() { exit 1 } +make_doc() { + echo "'touch man/git-$1.md && make man/git-$1.{1,html}'" +} + check_bash_script() { local cmd="git-$1" @@ -26,12 +30,12 @@ check_git_extras_cmd_list() { done grep "\- \*\*git\-$1(1)\*\*" man/git-extras.md >/dev/null \ - || err "Add git-$1 in the list of commands in man/git-extras.md" + || err "Add git-$1 in the list of commands in man/git-extras.md via $(make_doc "$1")" } check_man_page_index() { grep "git\-$1(1) git\-$1" man/index.txt >/dev/null \ - || err "Add git-$1 to index.txt" + || err "Add git-$1 to index.txt via $(make_doc "$1")" } check_documentation() { @@ -40,7 +44,7 @@ check_documentation() { if [ ! -f "man/$cmd.1" ] || [ ! -f "man/$cmd.html" ] then - err "Run 'make docs' to create man/$cmd.1 and man/$cmd.html" + err "Create man/$cmd.1 and man/$cmd.html via $(make_doc "$1")" fi check_git_extras_cmd_list "$@" @@ -87,4 +91,3 @@ for name in "$@"; do done echo 'All done' -exit 0 diff --git a/install.sh b/install.sh index 4b5b806..9fda0e0 100755 --- a/install.sh +++ b/install.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash make_install() { if [ -n "$PREFIX" ]