fix: build dizini yokken cd hatası düzeltildi

This commit is contained in:
Alhan
2026-07-22 04:05:35 +03:00
parent 9a63d2158d
commit 493342084a

View File

@@ -2,7 +2,8 @@
set -euo pipefail
APP=imajviewer
BUNDLE_DIR="$(cd "$(dirname "$0")/build/linux/x64/release/bundle" && pwd)"
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
BUNDLE_DIR="${SCRIPT_DIR}/build/linux/x64/release/bundle"
INSTALL_DIR="${HOME}/.local/lib/${APP}"
BIN_LINK="${HOME}/.local/bin/${APP}"
DESKTOP_FILE="${HOME}/.local/share/applications/${APP}.desktop"
@@ -21,9 +22,9 @@ command -v xdg-desktop-menu >/dev/null 2>&1 || err "xdg-desktop-menu bulunamadı
if [ ! -f "$BUNDLE_DIR/${APP}" ]; then
info "Binary bulunamadı, Flutter build başlatılıyor…"
cd "$(dirname "$0")"
cd "$SCRIPT_DIR"
flutter build linux 2>&1 | tail -1
BUNDLE_DIR="$(cd "$(dirname "$0")/build/linux/x64/release/bundle" && pwd)"
BUNDLE_DIR="${SCRIPT_DIR}/build/linux/x64/release/bundle"
[ -f "$BUNDLE_DIR/${APP}" ] || err "Build başarısız!"
fi