install.sh aktualisiert
Anpassung des Debug Mode, Nerdfont installation hinzugefügt Signed-off-by: klaas <klaas@boergmann.it>
This commit is contained in:
parent
c39799f4b9
commit
49a544d392
116
install.sh
116
install.sh
|
@ -1,12 +1,19 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Konfiguration
|
||||
DEBUG=true
|
||||
LOGFILE="/tmp/install.log"
|
||||
|
||||
DEBUG=true # oder false
|
||||
|
||||
# Logging-Setup
|
||||
if [ "$DEBUG" = true ]; then
|
||||
set -x
|
||||
echo "🛠 Debugmodus aktiv"
|
||||
set -x
|
||||
else
|
||||
echo "🔒 Starte im Silent-Modus – Logfile: $LOGFILE"
|
||||
exec > >(tee -a "$LOGFILE") 2>&1
|
||||
fi
|
||||
|
||||
# Pausieren im Debug-Modus
|
||||
pause_if_debug() {
|
||||
if [ "$DEBUG" = true ]; then
|
||||
printf "🔍 DEBUG: Drücke [Enter] um fortzufahren..."
|
||||
|
@ -14,61 +21,100 @@ pause_if_debug() {
|
|||
fi
|
||||
}
|
||||
|
||||
# install essentials
|
||||
echo "📦 Installiere Pakete..."
|
||||
sudo apt install nala -y
|
||||
sudo nala install alacritty ninja-build gettext libtool-bin cmake g++ pkg-config unzip curl git tmux build-essential manpages-dev clangd python3-jedi zsh -y
|
||||
log() {
|
||||
echo "$@"
|
||||
}
|
||||
|
||||
run() {
|
||||
if [ "$DEBUG" = true ]; then
|
||||
"$@"
|
||||
else
|
||||
"$@" >> "$LOGFILE" 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
log "📦 Installiere Pakete..."
|
||||
echo "deb [arch=amd64,arm64,armhf] https://deb.volian.org/volian/ scar main" | sudo tee /etc/apt/sources.list.d/volian-archive-scar-unstable.list
|
||||
wget -qO - https://deb.volian.org/volian/scar.key | sudo tee /etc/apt/trusted.gpg.d/volian-archive-scar-unstable.gpg > /dev/null
|
||||
run sudo apt update
|
||||
run sudo apt install nala -y
|
||||
run sudo nala install alacritty ninja-build gettext libtool-bin cmake g++ pkg-config unzip curl git tmux build-essential manpages-dev clangd python3-jedi zsh -y
|
||||
pause_if_debug
|
||||
clear
|
||||
|
||||
echo "Lade Daten"
|
||||
git clone https://git.boergmann.it/klaas/shellskripte
|
||||
cd shellskripte
|
||||
cp ./configs/zshrc ~/.zshrc
|
||||
cp ./ssh/authorized_keys ~/.ssh/authorized_keys
|
||||
sudo sh ./ssh/ssh_password -n
|
||||
log "📥 Lade Daten"
|
||||
run git clone https://git.boergmann.it/klaas/shellskripte
|
||||
cd shellskripte || exit 1
|
||||
run cp ./configs/zshrc ~/.zshrc
|
||||
mkdir -p ~/.ssh
|
||||
run cp ./ssh/authorized_keys ~/.ssh/authorized_keys
|
||||
run sudo sh ./ssh/ssh_password -n
|
||||
pause_if_debug
|
||||
clear
|
||||
|
||||
echo "Installiere Neovim"
|
||||
log "🧪 Installiere Neovim"
|
||||
cd ~
|
||||
git clone https://github.com/neovim/neovim
|
||||
cd neovim
|
||||
git checkout stable
|
||||
make CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
sudo make install
|
||||
run git clone https://github.com/neovim/neovim
|
||||
cd neovim || exit 1
|
||||
run git checkout stable
|
||||
run make CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
run sudo make install
|
||||
cd ~
|
||||
rm -Rf neovim
|
||||
|
||||
# config file for nvim
|
||||
mkdir ~/.config/nvim
|
||||
cp ~/shellskripte/configs/init.vim ~/.config/nvim/init.vim
|
||||
log "⚙️ Konfiguriere Neovim"
|
||||
mkdir -p ~/.config/nvim
|
||||
run cp ~/shellskripte/configs/init.vim ~/.config/nvim/init.vim
|
||||
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
|
||||
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
||||
nvim --headless +PlugInstall +qa
|
||||
# Language support for python and C
|
||||
nvim --headless -c 'CocInstall -sync coc-python' -c 'qall'
|
||||
nvim --headless -c 'CocInstall -sync coc-clang' -c 'qall'
|
||||
nvim --headless -c 'CocInstall -sync coc-clangd' -c 'qall'
|
||||
pause_if_debug
|
||||
clear
|
||||
|
||||
echo "Installiere nodeJS"
|
||||
log "⬇️ Installiere Node.js via nvm"
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
||||
nvm install v20
|
||||
|
||||
# usefull packages für nodeJS
|
||||
npm install -g yarn
|
||||
npm install -g nodemon
|
||||
log "📦 Installiere Node.js Tools"
|
||||
run npm install -g yarn
|
||||
run npm install -g nodemon
|
||||
|
||||
# nvim language support for nodeJS
|
||||
cd ~/.local/share/nvim/plugged/coc.nvim
|
||||
yarn install
|
||||
yarn build
|
||||
log "🔌 Neovim NodeJS-Sprachunterstützung"
|
||||
cd ~/.local/share/nvim/plugged/coc.nvim || exit 1
|
||||
run yarn install
|
||||
run yarn build
|
||||
|
||||
# aufräumen
|
||||
log "🧹 Aufräumen"
|
||||
rm -Rf ~/shellskripte
|
||||
|
||||
# zsh nutzen
|
||||
sudo usermod -s /bin/zsh klaas
|
||||
log "🔤 Installiere JetBrainsMono Nerd Font..."
|
||||
|
||||
FONT_DIR="$HOME/.local/share/fonts"
|
||||
mkdir -p "$FONT_DIR"
|
||||
|
||||
# Lade nur die Mono-Version (komplettes Nerd Font Paket ist riesig)
|
||||
run wget -O "$FONT_DIR/JetBrainsMonoNerdFontMono-Regular.ttf" \
|
||||
https://github.com/ryanoasis/nerd-fonts/releases/download/v3.1.1/JetBrainsMono.zip
|
||||
|
||||
# Entpacken
|
||||
TEMP_FONT_ZIP="/tmp/JetBrainsMono.zip"
|
||||
run wget -O "$TEMP_FONT_ZIP" https://github.com/ryanoasis/nerd-fonts/releases/download/v3.1.1/JetBrainsMono.zip
|
||||
run unzip -o "$TEMP_FONT_ZIP" -d "$FONT_DIR/JetBrainsMono"
|
||||
|
||||
# Optional: Nur *.ttf in den Font-Ordner verschieben
|
||||
find "$FONT_DIR/JetBrainsMono" -type f -name "*.ttf" -exec mv {} "$FONT_DIR/" \;
|
||||
rm -Rf "$FONT_DIR/JetBrainsMono" "$TEMP_FONT_ZIP"
|
||||
|
||||
# Font-Cache aktualisieren
|
||||
run fc-cache -fv "$FONT_DIR"
|
||||
|
||||
log "✅ JetBrainsMono Nerd Font installiert."
|
||||
|
||||
|
||||
log "💬 Zsh als Standardshell setzen"
|
||||
run sudo usermod -s /bin/zsh klaas
|
||||
|
|
Loading…
Reference in New Issue