update_depot_tools: always resolve base_dir with dirname

Other depot_tools scripts use dirname regardless of mingw,
so do that here too to simplify.

Bug: 1469696
Change-Id: I9a70975ef5614b1107ac87a5dc29b5ee1a06e298
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4750039
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
changes/39/4750039/2
Mike Frysinger 2 years ago committed by LUCI CQ
parent e8b6776755
commit 08e2e0cc9d

@ -25,21 +25,16 @@ if [ $MSYS = 0 ]; then
echo
fi
base_dir=$(dirname "$0")
if [ -e "$base_dir/.disable_auto_update" ]; then
exit
fi
# Test if this script is running under a MinGW install. If it is, we will
# hardcode the paths to Git where possible.
OUTPUT="$(uname | grep 'MINGW')"
MINGW=$?
if [ $MINGW = 0 ]; then
base_dir="${0%/*}"
else
base_dir=$(dirname "$0")
fi
if [ -e "$base_dir/.disable_auto_update" ]; then
exit
fi
# We want to update the bundled tools even under MinGW.
if [ $MINGW = 0 ]; then
$COMSPEC //c `cygpath -w "$base_dir/bootstrap/win_tools.bat"`

Loading…
Cancel
Save