mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +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:
committed by
Tim Ledbetter
parent
cc1f0c3af2
commit
16f68ab1bd
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user