|
|||||||
альтернативный вариант конструкции if ... fi / []
Время создания: 31.08.2017 20:51
Текстовые метки: code
Раздел: bash - конструкции
Запись: xintrea/mytetra_db_mcold/master/base/150167727094mynhhebj/text.html на raw.githubusercontent.com
|
|||||||
|
|||||||
usage() { cat <<EOF Usage: ${PROG} <source branch> [target branch] svn merge commit between verison when source branch copy(--stop-on-copy) and head version of source branch. Source branch must be a remote branch. Example: ${PROG} http://www.foo.com/project1/branches/feature1 # merge http://www.foo.com/project1/branches/feature1 to current svn direcotry ${PROG} http://www.foo.com/project1/branches/feature1 /path/to/svn/direcotry # merge branch http://www.foo.com/project1/branches/feature1 to svn direcotry /path/to/svn/direcotry # will prompt comfirm for committing to target branch. ${PROG} http://www.foo.com/project1/branches/feature1 http://www.foo.com/project1/branches/feature2 # merge http://www.foo.com/project1/branches/feature1 to branch http://www.foo.com/project1/branches/feature2 # because http://www.foo.com/project1/branches/feature2 is remote url, # will check out target branch to tmp direcotry, and prompt comfirm for committing to target branch. EOF exit $1 } [ $# -gt 2 ] && { echo "too many arguments!" usage 1 } source_branch=$1 target=${2:-.} [ $# -eq 0 ] && { usage } #if [ $# -eq 0 ]; then # usage #fi [ $# -gt 2 ] && { echo "too many arguments!" usage 1 } |
|||||||
Так же в этом разделе:
|
|||||||
|
|||||||
|