Refactor radar system

This commit is contained in:
Ayzen
2026-10-05 16:46:28 +03:00
parent 515049d2ed
commit 8f097dfa2e
179 changed files with 8212 additions and 6676 deletions
+7 -4
View File
@@ -35,6 +35,7 @@ while (( $# > 0 )); do
*) archive="$1"; shift ;;
esac
done
if [[ -n "${archive}" ]]; then archive="$(realpath -- "${archive}")"; fi
cd "${HOME}" # never stand in the directory that is about to be renamed
# --- check everything before touching the project ------------------------------
@@ -149,8 +150,8 @@ if [[ -n "${backup}" ]]; then
# writes new files instead of rewriting old ones.
data=()
for entry in "${backup}"/python_app/data*; do data+=("python_app/${entry##*/}"); done
for dir in "${backup}"/*/; do
name="$(basename -- "${dir}")"
for entry in "${backup}"/*; do
name="${entry##*/}"
case "${name}" in build|graphify-out|device_firmware|docs) continue ;; esac
[[ -e "${target}/${name}" ]] || data+=("${name}")
done
@@ -168,7 +169,9 @@ fi
venv="${target}/.venv"
if [[ -z "${python}" && -n "${backup}" && -x "${backup}/.venv/bin/python" ]]; then
say "carrying the venv over"
cp -al -- "${backup}/.venv" "${venv}"
# pip and generated caches may rewrite existing files: the rollback copy
# must own its files independently of the environment being upgraded.
cp -a -- "${backup}/.venv" "${venv}"
"${venv}/bin/python" -m pip install --quiet -r "${target}/requirements.txt"
else
python="${python:-$(command -v python3)}"
@@ -178,7 +181,7 @@ else
"${venv}/bin/python" -m pip install -r "${target}/requirements.txt"
fi
say "building the C++ part"
make -C "${target}" -j"$(nproc)" all
make -C "${target}" -j"$(nproc)" all kamil_adc_collector
echo "${archive##*/}" > "${target}/RELEASE"
trap - ERR