Skip to content

Commit

Permalink
tools: fix zconf.h path
Browse files Browse the repository at this point in the history
Use the `DEPS_DIR` variable to build the path instead of hardcoding it.

PR-URL: #48089
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
  • Loading branch information
lpinca authored and MoLow committed Jul 6, 2023
1 parent 2a4f79a commit 168d080
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/dep_updaters/update-zlib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ BASE_DIR=$(cd "$(dirname "$0")/../.." && pwd)
DEPS_DIR="$BASE_DIR/deps"

CURRENT_VERSION=$(grep "#define ZLIB_VERSION" "$DEPS_DIR/zlib/zlib.h" | sed -n "s/^.*VERSION \"\(.*\)\"/\1/p")

NEW_VERSION_ZLIB_H=$(curl -s "https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/zlib/zlib.h?format=TEXT" | base64 --decode)

NEW_VERSION=$(printf '%s' "$NEW_VERSION_ZLIB_H" | grep "#define ZLIB_VERSION" | sed -n "s/^.*VERSION \"\(.*\)\"/\1/p")
Expand Down Expand Up @@ -47,7 +47,7 @@ mkdir "$DEPS_DIR/zlib/win32"

mv "$DEPS_DIR/zlib.def" "$DEPS_DIR/zlib/win32"

perl -i -pe 's|^#include "chromeconf.h"|//#include "chromeconf.h"|' deps/zlib/zconf.h
perl -i -pe 's|^#include "chromeconf.h"|//#include "chromeconf.h"|' "$DEPS_DIR/zlib/zconf.h"

echo "All done!"
echo ""
Expand Down

0 comments on commit 168d080

Please sign in to comment.