mirror of
https://github.com/sched-ext/scx.git
synced 2024-12-11 11:22:26 +00:00
e9a9d32ab6
- combine c and kernel-examples as it's confusing to have both - rename 'rust-user' and 'c-user' to just 'rust' and 'c', which is simpler - update and fix sync-to-kernel.sh
23 lines
711 B
Bash
Executable File
23 lines
711 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
for manifest in "$MESON_SOURCE_ROOT"/scheds/rust/*/Cargo.toml; do
|
|
source_dir="${manifest%/Cargo.toml}"
|
|
target_dir="${MESON_BUILD_ROOT}${source_dir#${MESON_SOURCE_ROOT}}"
|
|
name="${target_dir##*/}"
|
|
|
|
bins=($(ls -t "${target_dir}/"*"/${name}"))
|
|
if [ ${#bins[@]} -lt 1 ]; then
|
|
echo "Cannot find a binary for $name under $target_dir" 1>&2
|
|
exit 1
|
|
fi
|
|
|
|
# XXX - Can we detect the current buildtype and install the correct one?
|
|
if [ ${#bins[@]} -gt 1 ]; then
|
|
echo "Found multiple binaries for $name under $target_dir, installing the latest which may not be what you want" 1>&2
|
|
fi
|
|
|
|
install -D "${bins[0]}" "${DESTDIR}/${MESON_INSTALL_PREFIX}/bin/${name}"
|
|
done
|