cmd/vendor-install.sh: fix style inconsistencies
This commit is contained in:
parent
1e9328c6e1
commit
3d862ef5e2
@ -30,10 +30,10 @@ fetch() {
|
|||||||
local temporary_path
|
local temporary_path
|
||||||
|
|
||||||
curl_args=(
|
curl_args=(
|
||||||
--fail \
|
--fail
|
||||||
--remote-time \
|
--remote-time
|
||||||
--location \
|
--location
|
||||||
--user-agent "$HOMEBREW_USER_AGENT_CURL" \
|
--user-agent "$HOMEBREW_USER_AGENT_CURL"
|
||||||
)
|
)
|
||||||
|
|
||||||
if [[ -n "$HOMEBREW_QUIET" ]]
|
if [[ -n "$HOMEBREW_QUIET" ]]
|
||||||
@ -44,7 +44,7 @@ fetch() {
|
|||||||
curl_args+=(--progress-bar)
|
curl_args+=(--progress-bar)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
temporary_path="${CACHED_LOCATION}.incomplete"
|
temporary_path="$CACHED_LOCATION.incomplete"
|
||||||
|
|
||||||
mkdir -p "$HOMEBREW_CACHE"
|
mkdir -p "$HOMEBREW_CACHE"
|
||||||
[[ -n "$HOMEBREW_QUIET" ]] || echo "==> Downloading $VENDOR_URL"
|
[[ -n "$HOMEBREW_QUIET" ]] || echo "==> Downloading $VENDOR_URL"
|
||||||
@ -67,7 +67,7 @@ fetch() {
|
|||||||
|
|
||||||
if [[ ! -f "$temporary_path" ]]
|
if [[ ! -f "$temporary_path" ]]
|
||||||
then
|
then
|
||||||
odie "Download failed: ${VENDOR_URL}"
|
odie "Download failed: $VENDOR_URL"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
trap '' SIGINT
|
trap '' SIGINT
|
||||||
@ -159,10 +159,10 @@ homebrew-vendor-install() {
|
|||||||
do
|
do
|
||||||
case "$option" in
|
case "$option" in
|
||||||
-\?|-h|--help|--usage) brew help vendor-install; exit $? ;;
|
-\?|-h|--help|--usage) brew help vendor-install; exit $? ;;
|
||||||
--verbose) HOMEBREW_VERBOSE=1 ;;
|
--verbose) HOMEBREW_VERBOSE=1 ;;
|
||||||
--quiet) HOMEBREW_QUIET=1 ;;
|
--quiet) HOMEBREW_QUIET=1 ;;
|
||||||
--debug) HOMEBREW_DEBUG=1 ;;
|
--debug) HOMEBREW_DEBUG=1 ;;
|
||||||
--*) ;;
|
--*) ;;
|
||||||
-*)
|
-*)
|
||||||
[[ "$option" = *v* ]] && HOMEBREW_VERBOSE=1
|
[[ "$option" = *v* ]] && HOMEBREW_VERBOSE=1
|
||||||
[[ "$option" = *q* ]] && HOMEBREW_QUIET=1
|
[[ "$option" = *q* ]] && HOMEBREW_QUIET=1
|
||||||
@ -188,7 +188,7 @@ homebrew-vendor-install() {
|
|||||||
odie "Cannot find a vendored version of $VENDOR_NAME."
|
odie "Cannot find a vendored version of $VENDOR_NAME."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
VENDOR_VERSION="$(<"$VENDOR_DIR/portable-${VENDOR_NAME}-version")"
|
VENDOR_VERSION="$(<"$VENDOR_DIR/portable-$VENDOR_NAME-version")"
|
||||||
CACHED_LOCATION="$HOMEBREW_CACHE/$(basename "$VENDOR_URL")"
|
CACHED_LOCATION="$HOMEBREW_CACHE/$(basename "$VENDOR_URL")"
|
||||||
|
|
||||||
lock "vendor-install-$VENDOR_NAME"
|
lock "vendor-install-$VENDOR_NAME"
|
||||||
|
|||||||
@ -42,7 +42,7 @@ executable() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
lowercase() {
|
lowercase() {
|
||||||
echo "$1" | tr '[:upper:]' '[:lower:]'
|
echo "$1" | tr "[:upper:]" "[:lower:]"
|
||||||
}
|
}
|
||||||
|
|
||||||
safe_exec() {
|
safe_exec() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user