]> git.madduck.net Git - etc/vim.git/blob - action/entrypoint.sh

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Strip redundant parentheses from assignment exprs (#1906)
[etc/vim.git] / action / entrypoint.sh
1 #!/bin/bash
2 set -e
3
4 # If no arguments are given use current working directory
5 black_args=(".")
6 if [ "$#" -eq 0 ] && [ "${INPUT_BLACK_ARGS}" != "" ]; then
7   black_args+=(${INPUT_BLACK_ARGS})
8 elif [ "$#" -ne 0 ] && [ "${INPUT_BLACK_ARGS}" != "" ]; then
9   black_args+=($* ${INPUT_BLACK_ARGS})
10 elif [ "$#" -ne 0 ] && [ "${INPUT_BLACK_ARGS}" == "" ]; then
11   black_args+=($*)
12 else
13   # Default (if no args provided).
14   black_args+=("--check" "--diff")
15 fi
16
17 sh -c "black . ${black_args[*]}"