Created
December 31, 2025 11:19
-
-
Save brahimmachkouri/b5e7e4bb1dc65c18540c8ad2e88c0097 to your computer and use it in GitHub Desktop.
LMStudio for Linux update
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| LMSTUDIO_DIR="/opt/lmstudio" | |
| LMSTUDIO_BIN="${LMSTUDIO_DIR}/LM-Studio.AppImage" | |
| LMSTUDIO_TMP="${LMSTUDIO_DIR}/LM-Studio.AppImage.new" | |
| LMSTUDIO_URL="https://lmstudio.ai/download/latest/linux/x64" | |
| # Vérification exécution en root | |
| if [[ "${EUID}" -ne 0 ]]; then | |
| echo "❌ Ce script doit être exécuté avec sudo." | |
| echo "👉 Exemple : sudo $0" | |
| exit 1 | |
| fi | |
| command -v wget >/dev/null 2>&1 || { | |
| echo "❌ wget n'est pas installé." | |
| exit 1 | |
| } | |
| echo "📁 Préparation du répertoire ${LMSTUDIO_DIR}" | |
| mkdir -p "${LMSTUDIO_DIR}" | |
| echo "⬇️ Téléchargement de la dernière version de LM Studio (fichier temporaire)…" | |
| wget -q --show-progress "${LMSTUDIO_URL}" -O "${LMSTUDIO_TMP}" | |
| echo "🔐 Application des permissions" | |
| chmod +x "${LMSTUDIO_TMP}" | |
| echo "🔁 Remplacement atomique de l’ancienne version" | |
| mv -f "${LMSTUDIO_TMP}" "${LMSTUDIO_BIN}" | |
| echo "✅ LM Studio a été mis à jour avec succès." | |
| echo "📍 ${LMSTUDIO_BIN}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment