Adding new neovim config to path
This commit is contained in:
commit
ff02994a8d
46
install_nvim.sh
Executable file
46
install_nvim.sh
Executable file
@ -0,0 +1,46 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Zielverzeichnis für Neovim
|
||||||
|
TMP_DIR=$(mktemp -d)
|
||||||
|
ARCH=$(uname -m)
|
||||||
|
|
||||||
|
# Plattformabhängige Architektur
|
||||||
|
if [[ "$ARCH" == "x86_64" ]]; then
|
||||||
|
ARCH_LABEL="x86_64"
|
||||||
|
elif [[ "$ARCH" == "aarch64" ]]; then
|
||||||
|
ARCH_LABEL="linux-arm64"
|
||||||
|
else
|
||||||
|
echo "Nicht unterstützte Architektur: $ARCH"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
INSTALL_DIR="$HOME/.local/share/nvim-$ARCH_LABEL"
|
||||||
|
|
||||||
|
# Download-Link für das Release-Tarball
|
||||||
|
NVIM_TARBALL_URL="https://github.com/neovim/neovim/releases/latest/download/nvim-linux-${ARCH_LABEL}.tar.gz"
|
||||||
|
|
||||||
|
echo "📥 Lade Neovim tar.gz von GitHub herunter..."
|
||||||
|
curl -L "$NVIM_TARBALL_URL" -o "$TMP_DIR/nvim.tar.gz"
|
||||||
|
|
||||||
|
echo "📦 Entpacke Neovim nach $INSTALL_DIR ..."
|
||||||
|
[ -d ${INSTALL_DIR} ] && rm -r $INSTALL_DIR
|
||||||
|
mkdir -p "$INSTALL_DIR"
|
||||||
|
tar -xzf "$TMP_DIR/nvim.tar.gz" -C "$INSTALL_DIR" --strip-components=1
|
||||||
|
ln -sf $INSTALL_DIR/bin/nvim $HOME/.local/bin/nvim
|
||||||
|
|
||||||
|
# Prüfen ob ~/.config/bin/ im PATH ist
|
||||||
|
if ! echo "$PATH" | grep -q "$HOME/.local/bin"; then
|
||||||
|
echo ""
|
||||||
|
echo "⚠️ $HOME/.config/bin/nvim/bin ist nicht im PATH."
|
||||||
|
echo "Füge Folgendes zu deiner ~/.bashrc oder ~/.zshrc hinzu:"
|
||||||
|
echo "export PATH=\"$HOME/.local/bin/:\$PATH\""
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo "✅ Neovim wurde erfolgreich installiert in $INSTALL_DIR"
|
||||||
|
echo "Starte es mit: nvim"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Aufräumen
|
||||||
|
rm -rf "$TMP_DIR"
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user