Includes prior-session patches (carry forward so the app compiles): - crates/gpui/build.rs: cross-compile manifest fix - crates/gpui/src/platform.rs: PlatformWindow::activate_with_token trait method - crates/gpui/src/window.rs: Window::activate_with_token public API - crates/gpui_linux/src/linux/wayland/window.rs: WaylandWindow::activate_with_token + activate() keyboard-serial fix Plus the focus-serial fix: - serial.rs: SerialKind::KeyboardEnter - client.rs: store wl_keyboard.enter serial; latest_serial_of() Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
36 lines
1.0 KiB
Bash
Executable File
36 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -euxo pipefail
|
|
|
|
if [[ $# -lt 1 || $# -gt 2 ]]; then
|
|
echo "usage: $0 <MAX_SIZE_IN_GB> [SMALL_CLEAN_SIZE_IN_GB]"
|
|
exit 1
|
|
fi
|
|
|
|
if ! [[ -d target ]]; then
|
|
echo "target directory does not exist yet"
|
|
exit 0
|
|
fi
|
|
|
|
max_size_gb=$1
|
|
small_clean_size_gb=${2:-}
|
|
|
|
if [[ -n "${small_clean_size_gb}" && ${small_clean_size_gb} -ge ${max_size_gb} ]]; then
|
|
echo "error: small clean threshold (${small_clean_size_gb}gb) must be smaller than max size (${max_size_gb}gb)"
|
|
exit 1
|
|
fi
|
|
|
|
current_size=$(du -s target | cut -f1)
|
|
current_size_gb=$(( ${current_size} / 1024 / 1024 ))
|
|
|
|
echo "target directory size: ${current_size_gb}gb. max size: ${max_size_gb}gb"
|
|
|
|
if [[ ${current_size_gb} -gt ${max_size_gb} ]]; then
|
|
echo "clearing target directory"
|
|
shopt -s dotglob
|
|
rm -rf target/*
|
|
elif [[ -n "${small_clean_size_gb}" && ${current_size_gb} -gt ${small_clean_size_gb} ]]; then
|
|
echo "running cargo clean --workspace (size above small clean threshold of ${small_clean_size_gb}gb)"
|
|
cargo clean --workspace
|
|
fi
|