commit | f50df990af7a8cc70a8b42cd539538728c067df7 | [log] [tgz] |
---|---|---|
author | Vincent Driessen <vincent@datafox.nl> | 周五 10月 08 08:39:25 2010 +0200 |
committer | Vincent Driessen <vincent@datafox.nl> | 周五 10月 08 08:39:25 2010 +0200 |
tree | d4464f75236bb83c25057ff6d9ba8ea3a94a6d4c | |
parent | ca8be5275ff6fd3e5f8012f31054c34d25ff0d9a [diff] [blame] |
Manually select the last argument. This implementation does not rely on Bash-specific functionality.
diff --git a/gitflow-common b/gitflow-common index dcb58bd..e5ffc74 100644 --- a/gitflow-common +++ b/gitflow-common
@@ -44,6 +44,14 @@ warn() { echo "$@" >&2; } die() { warn "$@"; exit 1; } +# argument processing +last_arg() { + if [ $# -ne 0 ]; then + shift $(expr $# - 1) + echo "$1" + fi +} + # set logic has() { local item=$1; shift