#!/bin/shset -eif (cd -P .) 2>/dev/null; thenCHDIR='cd -P'elseCHDIR='cd'fiquiet=branch=until [ $# = 0 ]; docase "1ドル" in--) shift; break;;-C|--directory) shift; $CHDIR "1ドル";;-C*) $CHDIR `expr "1ドル" : '-C\(.*\)'`;;--directory=*) $CHDIR `expr "1ドル" : '[^=]*=\(.*\)'`;;-q) quiet=1;;-b|--branch) shift; branch="1ドル";;-b*) branch=`expr "1ドル" : '-b\(.*\)'`;;--branch=*) branch=`expr "1ドル" : '[^=]*=\(.*\)'`;;-*) echo "unknown option: 1ドル" 1>&2; exit 1;;*) break;;esacshiftdoneurl="1ドル"dir="2ドル"shift 2[ x"$branch" = x ] && unset branch || :if [ -d "$dir" ]; thenif [ x"$(git -C "$dir" describe --tags)" = x"$branch" ]; thenexit 0 # already up-to-datefiecho updating `expr "/$dir/" : '.*/\([^/][^/]*\)/'` ...[ $quiet ] || set -x$CHDIR "$dir"${branch+git} ${branch+fetch} ${branch+"$@"}exec git ${branch+checkout} "${branch-pull}" "$@"elseecho retrieving `expr "/$dir/" : '.*/\([^/][^/]*\)/'` ...[ $quiet ] || set -xexec git clone ${branch+--branch} ${branch+"$branch"} "$url" "$dir" "$@"fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。