initial commit
This commit is contained in:
49
install/bootstrap.sh
Executable file
49
install/bootstrap.sh
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env bash
|
||||
# bootstrap.sh — run this on a fresh Linux Mint install
|
||||
set -euo pipefail
|
||||
|
||||
DOTFILES_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
||||
CONFIGS_DIR="$DOTFILES_DIR/configs"
|
||||
|
||||
echo "==> Dotfiles bootstrap"
|
||||
echo " dotfiles: $DOTFILES_DIR"
|
||||
echo ""
|
||||
|
||||
# ─── install packages and tools ───────────────────────────────────────────────
|
||||
bash "$CONFIGS_DIR/install/apt-packages.sh"
|
||||
bash "$CONFIGS_DIR/install/rust.sh"
|
||||
bash "$CONFIGS_DIR/install/docker.sh"
|
||||
bash "$CONFIGS_DIR/install/node.sh"
|
||||
bash "$CONFIGS_DIR/install/tools.sh"
|
||||
bash "$CONFIGS_DIR/install/fonts.sh"
|
||||
|
||||
# ─── symlink configs with stow ────────────────────────────────────────────────
|
||||
echo ""
|
||||
echo "==> Symlinking configs with stow..."
|
||||
|
||||
cd "$CONFIGS_DIR"
|
||||
|
||||
for group in shell tmux alacritty git vscode; do
|
||||
echo " stow $group -> ~"
|
||||
stow -v --target="$HOME" "$group"
|
||||
done
|
||||
|
||||
# ─── tmux plugins ─────────────────────────────────────────────────────────────
|
||||
echo ""
|
||||
echo "==> Installing tmux plugins (tpm)..."
|
||||
if [ ! -d "$HOME/.tmux/plugins/tpm" ]; then
|
||||
git clone https://github.com/tmux-plugins/tpm "$HOME/.tmux/plugins/tpm"
|
||||
fi
|
||||
# install plugins headlessly
|
||||
"$HOME/.tmux/plugins/tpm/bin/install_plugins" || true
|
||||
|
||||
echo ""
|
||||
echo "==> Installing VSCode extensions..."
|
||||
if command -v code &>/dev/null; then
|
||||
grep -v '^#' "$CONFIGS_DIR/vscode/extensions.txt" | grep -v '^$' | xargs -L1 code --install-extension
|
||||
else
|
||||
echo " code not found, skipping extensions"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "==> Done! Open a new terminal or run: source ~/.bashrc"
|
||||
Reference in New Issue
Block a user