mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 10:19:20 +00:00
Meta: Make LADYBIRD_SOURCE_DIR consistent between WPT.sh and ladybird.sh
ladybird.sh allows the source directory to be overriden to point to another source directory. I am not sure if anyone is actually using this behaviour in practise, but let's make the behaviour at least common between the two scripts with a helper function.
This commit is contained in:
parent
cc1f0c3af2
commit
16f68ab1bd
Notes:
github-actions[bot]
2024-10-09 10:32:57 +00:00
Author: https://github.com/shannonbooth
Commit: 16f68ab1bd
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1687
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/tcl3 ✅
3 changed files with 17 additions and 12 deletions
|
@ -49,3 +49,14 @@ get_number_of_processing_units() {
|
|||
|
||||
($number_of_processing_units)
|
||||
}
|
||||
|
||||
get_top_dir() {
|
||||
git rev-parse --show-toplevel
|
||||
}
|
||||
|
||||
ensure_ladybird_source_dir() {
|
||||
if [ -z "$LADYBIRD_SOURCE_DIR" ] || [ ! -d "$LADYBIRD_SOURCE_DIR" ]; then
|
||||
LADYBIRD_SOURCE_DIR="$(get_top_dir)"
|
||||
export LADYBIRD_SOURCE_DIR
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue