Skip to content

Commit

Permalink
Meta: Make ladybird.sh old bash compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
ichihara-3 authored and ADKaster committed Jul 15, 2024
1 parent ff7ca5c commit 0307095
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions Meta/ladybird.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,18 @@ cmd_with_target() {
export LADYBIRD_SOURCE_DIR
fi

declare -A BUILD_DIRECTORIES

# Note: Keep in sync with buildDir defaults in CMakePresets.json
BUILD_DIRECTORIES["default"]="$LADYBIRD_SOURCE_DIR/Build/ladybird"
BUILD_DIRECTORIES["Debug"]="$LADYBIRD_SOURCE_DIR/Build/ladybird-debug"
BUILD_DIRECTORIES["Sanitizer"]="$LADYBIRD_SOURCE_DIR/Build/ladybird-sanitizers"

BUILD_DIR="${BUILD_DIRECTORIES[${BUILD_PRESET}]}"
case "${BUILD_PRESET}" in
"default")
BUILD_DIR="${LADYBIRD_SOURCE_DIR}/Build/ladybird"
;;
"Debug")
BUILD_DIR="${LADYBIRD_SOURCE_DIR}/Build/ladybird-debug"
;;
"Sanitizer")
BUILD_DIR="${LADYBIRD_SOURCE_DIR}/Build/ladybird-sanitizers"
;;
esac

CMAKE_ARGS+=("-DCMAKE_INSTALL_PREFIX=$LADYBIRD_SOURCE_DIR/Build/ladybird-install-${BUILD_PRESET}")

Expand Down

0 comments on commit 0307095

Please sign in to comment.