cmd/update.sh: fix style inconsistencies

This commit is contained in:
Martin Afanasjew 2016-08-07 12:51:12 +02:00
parent 79c49b3638
commit 1e9328c6e1

View File

@ -292,11 +292,11 @@ homebrew-update() {
--preinstall) export HOMEBREW_UPDATE_PREINSTALL=1 ;;
--*) ;;
-*)
[[ "$option" = *v* ]] && HOMEBREW_VERBOSE=1;
[[ "$option" = *d* ]] && HOMEBREW_DEBUG=1;
[[ "$option" = *v* ]] && HOMEBREW_VERBOSE=1
[[ "$option" = *d* ]] && HOMEBREW_DEBUG=1
;;
*)
odie <<-EOS
odie <<EOS
This command updates brew itself, and does not take formula names.
Use 'brew upgrade <formula>'.
EOS
@ -312,7 +312,7 @@ EOS
# check permissions
if [[ "$HOMEBREW_PREFIX" = "/usr/local" && ! -w /usr/local ]]
then
odie <<-EOS
odie <<EOS
/usr/local is not writable. You should change the ownership
and permissions of /usr/local back to your user account:
sudo chown -R \$(whoami) /usr/local
@ -321,7 +321,7 @@ EOS
if [[ ! -w "$HOMEBREW_REPOSITORY" ]]
then
odie <<-EOS
odie <<EOS
$HOMEBREW_REPOSITORY is not writable. You should change the
ownership and permissions of $HOMEBREW_REPOSITORY back to your
user account:
@ -387,7 +387,7 @@ EOS
if [[ -n "$HOMEBREW_UPDATE_PREINSTALL" ]]
then
# Skip taps without formulae.
FORMULAE="$(find "$DIR" -maxdepth 1 \( -name '*.rb' -or -name 'Formula' -or -name 'HomebrewFormula' \) -print -quit)"
FORMULAE="$(find "$DIR" -maxdepth 1 \( -name "*.rb" -or -name Formula -or -name HomebrewFormula \) -print -quit)"
[[ -z "$FORMULAE" ]] && exit
fi
@ -399,7 +399,7 @@ EOS
UPSTREAM_BRANCH_LOCAL_SHA="$(git rev-parse "refs/remotes/origin/$UPSTREAM_BRANCH")"
# Only try to `git fetch` when the upstream branch is at a different SHA
# (so the API does not return 304: unmodified).
UPSTREAM_SHA_HTTP_CODE="$("$HOMEBREW_CURL" --silent '--max-time' 3 \
UPSTREAM_SHA_HTTP_CODE="$("$HOMEBREW_CURL" --silent --max-time 3 \
--output /dev/null --write-out "%{http_code}" \
--user-agent "$HOMEBREW_USER_AGENT_CURL" \
--header "Accept: application/vnd.github.v3.sha" \