Initial commit: add Location Plotter
This commit is contained in:
Executable
+52
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
if [[ ! -r /etc/os-release ]]; then
|
||||
echo "Ubuntu surumu tespit edilemedi." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
source /etc/os-release
|
||||
if [[ "${ID:-}" != "ubuntu" ]]; then
|
||||
echo "Bu kurulum betigi Ubuntu icindir (tespit edilen: ${PRETTY_NAME:-bilinmiyor})." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
current_user="${SUDO_USER:-${USER:-$(id -un)}}"
|
||||
|
||||
if ! dpkg --compare-versions "${VERSION_ID:-0}" ge 22.04; then
|
||||
echo "Ubuntu 22.04 veya daha yeni bir surum gerekiyor (tespit edilen: ${VERSION_ID:-bilinmiyor})." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! command -v sudo >/dev/null 2>&1; then
|
||||
echo "Paketleri kurmak icin sudo komutu gerekiyor." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Gerekli Ubuntu paketleri kuruluyor..."
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
build-essential \
|
||||
cmake \
|
||||
qt6-base-dev \
|
||||
zlib1g-dev
|
||||
|
||||
if getent group dialout >/dev/null && ! id -nG "$current_user" | tr ' ' '\n' | grep -qx dialout; then
|
||||
echo "Seri port erisimi icin $current_user kullanicisi dialout grubuna ekleniyor..."
|
||||
sudo usermod -a -G dialout "$current_user"
|
||||
fi
|
||||
|
||||
echo "Uygulama derleniyor..."
|
||||
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build --parallel "$(nproc)"
|
||||
|
||||
echo "Testler calistiriliyor..."
|
||||
ctest --test-dir build --output-on-failure
|
||||
|
||||
echo
|
||||
echo "Kurulum tamamlandi. Uygulamayi baslatmak icin:"
|
||||
echo " ./run.sh"
|
||||
Reference in New Issue
Block a user