* Initial plan * Consolidate mise tools installation and fix GitHub Copilot CLI package Co-authored-by: andrejusk <7396847+andrejusk@users.noreply.github.com> * Revert copilot package changes and remove --jobs flag from mise install Co-authored-by: andrejusk <7396847+andrejusk@users.noreply.github.com> * fix: permissions * Move GitHub CLI (gh) installation to mise Co-authored-by: andrejusk <7396847+andrejusk@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: andrejusk <7396847+andrejusk@users.noreply.github.com> Co-authored-by: Andrejus <git@andrejus.uk>
47 lines
1.1 KiB
Bash
Executable File
47 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Description:
|
|
# Install and run stow.
|
|
#
|
|
|
|
if ! command -v stow &> /dev/null; then
|
|
case "$DOTS_PKG" in
|
|
apt)
|
|
sudo apt-get install -qq stow
|
|
;;
|
|
pacman)
|
|
sudo pacman -S --noconfirm stow
|
|
;;
|
|
brew)
|
|
brew install stow
|
|
;;
|
|
*)
|
|
log_warn "Skipping stow install: no supported package manager found"
|
|
return 0
|
|
;;
|
|
esac
|
|
fi
|
|
|
|
stow --version
|
|
|
|
root_dir=${DOTFILES:-$(dirname "$(dirname "$(dirname "$(realpath "$0")")")")}
|
|
|
|
rm -f "$HOME/.bash_profile"
|
|
rm -f "$HOME/.bashrc"
|
|
rm -f "$HOME/.gitconfig"
|
|
rm -f "$HOME/.profile"
|
|
rm -f "$HOME/.zshrc"
|
|
rm -f "$HOME/.p10k.zsh"
|
|
rm -f "$HOME/.ssh/config"
|
|
|
|
mkdir -p "$HOME/.config"
|
|
mkdir -p "$HOME/.ssh"
|
|
|
|
stow --dir="$root_dir/files" --target="$HOME" home
|
|
stow --dir="$root_dir/files" --target="$HOME/.config" dot-config
|
|
stow --dir="$root_dir/files" --target="$HOME/.ssh" dot-ssh
|
|
|
|
# Bust PATH cache to force regeneration with new profile
|
|
rm -f "${XDG_CACHE_HOME:-$HOME/.cache}/dots/path"
|