mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 11:07:45 +00:00
LibWeb: Only update /etc/hosts for WPT if required lines are not present
This commit is contained in:
parent
99499a6fae
commit
326e8a0a33
1 changed files with 5 additions and 3 deletions
|
@ -31,9 +31,11 @@ if [ ! -d "${SCRIPT_DIR}/wpt" ]; then
|
|||
# Apply WPT patch with Ladybird runner
|
||||
(cd wpt; git apply ../ladybird_runner.patch)
|
||||
|
||||
# Update hosts file
|
||||
# FIXME: Only do this if required. Otherwise your /etc/hosts gets crowded quickly
|
||||
# Update hosts file if needed
|
||||
if [ "$(comm -13 <(sort -u /etc/hosts) <(python3 ./wpt/wpt make-hosts-file | sort -u) | wc -l)" -gt 0 ]; then
|
||||
echo "Enter superuser password to append wpt hosts to /etc/hosts"
|
||||
python3 "./wpt/wpt" make-hosts-file | sudo tee -a /etc/hosts
|
||||
fi
|
||||
fi
|
||||
|
||||
# Extract metadata.txt into directory with expectation files expected by WPT runner
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue