mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
cipd/python: optimize cat usage
Bash has a builtin for reading files, so use that instead of running the cat program to save on time & overhead. Change-Id: Ia90fc22a47f2ead4ef056020a79ebdebd7bd70ca Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4111082 Reviewed-by: Brian Ryner <bryner@google.com> Commit-Queue: Mike Frysinger <vapier@chromium.org> Reviewed-by: Gavin Mak <gavinmak@google.com>
This commit is contained in:
@@ -6,7 +6,7 @@ if [ "$OSTYPE" = "msys" ]
|
||||
then
|
||||
PYTHON3_BIN_DIR="$DEPOT_TOOLS/$(sed -e 's-\\-/-g' $DEPOT_TOOLS/python3_bin_reldir.txt)"
|
||||
else
|
||||
PYTHON3_BIN_DIR="$DEPOT_TOOLS/$(cat $DEPOT_TOOLS/python3_bin_reldir.txt)"
|
||||
PYTHON3_BIN_DIR="$DEPOT_TOOLS/$(<"$DEPOT_TOOLS/python3_bin_reldir.txt")"
|
||||
fi
|
||||
PATH="$PYTHON3_BIN_DIR":"$PYTHON3_BIN_DIR/Scripts":"$PATH"
|
||||
"$PYTHON3_BIN_DIR/python3" "$@"
|
||||
|
||||
Reference in New Issue
Block a user