mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-06-11 02:31:10 +00:00
23 lines
802 B
Bash
Executable file
23 lines
802 B
Bash
Executable file
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
PLUME_DIR="$ROOT/thirdparty/plume"
|
|
PATCH_FILE="$ROOT/tools/patches/plume-ios-sdl-vulkan.patch"
|
|
|
|
if [[ ! -d "$PLUME_DIR/.git" && ! -f "$PLUME_DIR/.git" ]]; then
|
|
printf 'Missing Plume submodule. Run: git submodule update --init --recursive\n' >&2
|
|
exit 1
|
|
fi
|
|
|
|
if git -C "$PLUME_DIR" apply --check "$PATCH_FILE" >/dev/null 2>&1; then
|
|
git -C "$PLUME_DIR" apply "$PATCH_FILE"
|
|
printf 'Applied Plume iOS patch.\n'
|
|
else
|
|
if git -C "$PLUME_DIR" apply --reverse --check "$PATCH_FILE" >/dev/null 2>&1; then
|
|
printf 'Plume iOS patch already applied.\n'
|
|
else
|
|
printf 'Plume iOS patch cannot be applied cleanly. Check thirdparty/plume for local changes.\n' >&2
|
|
exit 1
|
|
fi
|
|
fi
|