mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-01-26 11:14:08 +00:00
dotbot config, submodules and cleanup
This commit is contained in:
@@ -1,151 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# sh install-dotfiles.sh
|
||||
#
|
||||
# Environment variables: VERBOSE, CP, LN, MKDIR, RM, DIRNAME.
|
||||
#
|
||||
# env VERBOSE=1 sh install-dotfiles.sh
|
||||
#
|
||||
# DO NOT EDIT THIS FILE
|
||||
#
|
||||
# This file is generated by rcm(7) as:
|
||||
#
|
||||
# rcup -B 0 -g
|
||||
#
|
||||
# To update it, re-run the above command.
|
||||
#
|
||||
: ${VERBOSE:=0}
|
||||
: ${CP:=/bin/cp}
|
||||
: ${LN:=/bin/ln}
|
||||
: ${MKDIR:=/bin/mkdir}
|
||||
: ${RM:=/bin/rm}
|
||||
: ${DIRNAME:=/usr/bin/dirname}
|
||||
verbose() {
|
||||
if [ "$VERBOSE" -gt 0 ]; then
|
||||
echo "$@"
|
||||
fi
|
||||
}
|
||||
handle_file_cp() {
|
||||
if [ -e "$2" ]; then
|
||||
printf "%s " "overwrite $2? [yN]"
|
||||
read overwrite
|
||||
case "$overwrite" in
|
||||
y)
|
||||
$RM -rf "$2"
|
||||
;;
|
||||
*)
|
||||
echo "skipping $2"
|
||||
return
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
verbose "'$1' -> '$2'"
|
||||
$MKDIR -p "$($DIRNAME "$2")"
|
||||
$CP -R "$1" "$2"
|
||||
}
|
||||
handle_file_ln() {
|
||||
if [ -e "$2" ]; then
|
||||
printf "%s " "overwrite $2? [yN]"
|
||||
read overwrite
|
||||
case "$overwrite" in
|
||||
y)
|
||||
$RM -rf "$2"
|
||||
;;
|
||||
*)
|
||||
echo "skipping $2"
|
||||
return
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
verbose "'$1' -> '$2'"
|
||||
$MKDIR -p "$($DIRNAME "$2")"
|
||||
$LN -sf "$1" "$2"
|
||||
}
|
||||
handle_file_ln "$HOME/.dotfiles/bash_profile" "$HOME/.bash_profile"
|
||||
handle_file_ln "$HOME/.dotfiles/bashrc" "$HOME/.bashrc"
|
||||
handle_file_ln "$HOME/.dotfiles/config/alias" "$HOME/.config/alias"
|
||||
handle_file_ln "$HOME/.dotfiles/config/astronvim/lua/user/LICENSE" "$HOME/.config/astronvim/lua/user/LICENSE"
|
||||
handle_file_ln "$HOME/.dotfiles/config/astronvim/lua/user/init.lua" "$HOME/.config/astronvim/lua/user/init.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/exports" "$HOME/.config/exports"
|
||||
handle_file_ln "$HOME/.dotfiles/config/flipperdevices.com/qFlipper.ini" "$HOME/.config/flipperdevices.com/qFlipper.ini"
|
||||
handle_file_ln "$HOME/.dotfiles/config/functions" "$HOME/.config/functions"
|
||||
handle_file_ln "$HOME/.dotfiles/config/gh/config.yml" "$HOME/.config/gh/config.yml"
|
||||
handle_file_ln "$HOME/.dotfiles/config/git/config" "$HOME/.config/git/config"
|
||||
handle_file_ln "$HOME/.dotfiles/config/git/gitignore" "$HOME/.config/git/gitignore"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/LICENSE" "$HOME/.config/nvim/LICENSE"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/config.ld" "$HOME/.config/nvim/config.ld"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/init.lua" "$HOME/.config/nvim/init.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/autocmds.lua" "$HOME/.config/nvim/lua/core/autocmds.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/bootstrap.lua" "$HOME/.config/nvim/lua/core/bootstrap.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/icons/nerd_font.lua" "$HOME/.config/nvim/lua/core/icons/nerd_font.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/icons/text.lua" "$HOME/.config/nvim/lua/core/icons/text.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/lazy.lua" "$HOME/.config/nvim/lua/core/lazy.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/mappings.lua" "$HOME/.config/nvim/lua/core/mappings.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/options.lua" "$HOME/.config/nvim/lua/core/options.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/utils/buffer.lua" "$HOME/.config/nvim/lua/core/utils/buffer.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/utils/ffi.lua" "$HOME/.config/nvim/lua/core/utils/ffi.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/utils/git.lua" "$HOME/.config/nvim/lua/core/utils/git.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/utils/init.lua" "$HOME/.config/nvim/lua/core/utils/init.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/utils/lsp.lua" "$HOME/.config/nvim/lua/core/utils/lsp.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/utils/mason.lua" "$HOME/.config/nvim/lua/core/utils/mason.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/utils/status.lua" "$HOME/.config/nvim/lua/core/utils/status.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/utils/ui.lua" "$HOME/.config/nvim/lua/core/utils/ui.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/utils/updater.lua" "$HOME/.config/nvim/lua/core/utils/updater.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/lazy_snapshot.lua" "$HOME/.config/nvim/lua/lazy_snapshot.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/alpha.lua" "$HOME/.config/nvim/lua/plugins/alpha.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/cmp.lua" "$HOME/.config/nvim/lua/plugins/cmp.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/alpha.lua" "$HOME/.config/nvim/lua/plugins/configs/alpha.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/guess-indent.lua" "$HOME/.config/nvim/lua/plugins/configs/guess-indent.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/heirline.lua" "$HOME/.config/nvim/lua/plugins/configs/heirline.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/lspconfig.lua" "$HOME/.config/nvim/lua/plugins/configs/lspconfig.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/lspkind.lua" "$HOME/.config/nvim/lua/plugins/configs/lspkind.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/luasnip.lua" "$HOME/.config/nvim/lua/plugins/configs/luasnip.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/mason-lspconfig.lua" "$HOME/.config/nvim/lua/plugins/configs/mason-lspconfig.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/mason-null-ls.lua" "$HOME/.config/nvim/lua/plugins/configs/mason-null-ls.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/mason-nvim-dap.lua" "$HOME/.config/nvim/lua/plugins/configs/mason-nvim-dap.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/mason.lua" "$HOME/.config/nvim/lua/plugins/configs/mason.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/notify.lua" "$HOME/.config/nvim/lua/plugins/configs/notify.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/nvim-autopairs.lua" "$HOME/.config/nvim/lua/plugins/configs/nvim-autopairs.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/nvim-dap-ui.lua" "$HOME/.config/nvim/lua/plugins/configs/nvim-dap-ui.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/nvim-treesitter.lua" "$HOME/.config/nvim/lua/plugins/configs/nvim-treesitter.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/nvim-web-devicons.lua" "$HOME/.config/nvim/lua/plugins/configs/nvim-web-devicons.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/telescope.lua" "$HOME/.config/nvim/lua/plugins/configs/telescope.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/which-key.lua" "$HOME/.config/nvim/lua/plugins/configs/which-key.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/core.lua" "$HOME/.config/nvim/lua/plugins/core.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/dap.lua" "$HOME/.config/nvim/lua/plugins/dap.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/git.lua" "$HOME/.config/nvim/lua/plugins/git.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/heirline.lua" "$HOME/.config/nvim/lua/plugins/heirline.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/lsp.lua" "$HOME/.config/nvim/lua/plugins/lsp.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/mason.lua" "$HOME/.config/nvim/lua/plugins/mason.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/neo-tree.lua" "$HOME/.config/nvim/lua/plugins/neo-tree.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/telescope.lua" "$HOME/.config/nvim/lua/plugins/telescope.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/treesitter.lua" "$HOME/.config/nvim/lua/plugins/treesitter.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/ui.lua" "$HOME/.config/nvim/lua/plugins/ui.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/user_example/init.lua" "$HOME/.config/nvim/lua/user_example/init.lua"
|
||||
handle_file_ln "$HOME/.dotfiles/config/starship.toml" "$HOME/.config/starship.toml"
|
||||
handle_file_ln "$HOME/.dotfiles/config/tmux/tmux.conf" "$HOME/.config/tmux/tmux.conf"
|
||||
handle_file_ln "$HOME/.dotfiles/config/wtf/config.yml" "$HOME/.config/wtf/config.yml"
|
||||
handle_file_ln "$HOME/.dotfiles/ecrc" "$HOME/.ecrc"
|
||||
handle_file_ln "$HOME/.dotfiles/git_profiles" "$HOME/.git_profiles"
|
||||
handle_file_ln "$HOME/.dotfiles/huskyrc" "$HOME/.huskyrc"
|
||||
handle_file_ln "$HOME/.dotfiles/local/bin/antigen.zsh" "$HOME/.local/bin/antigen.zsh"
|
||||
handle_file_ln "$HOME/.dotfiles/local/bin/dfm" "$HOME/.local/bin/dfm"
|
||||
handle_file_ln "$HOME/.dotfiles/local/bin/git-dirty" "$HOME/.local/bin/git-dirty"
|
||||
handle_file_ln "$HOME/.dotfiles/local/bin/x-check-git-attributes" "$HOME/.local/bin/x-check-git-attributes"
|
||||
handle_file_ln "$HOME/.dotfiles/local/bin/x-dupes.pl" "$HOME/.local/bin/x-dupes.pl"
|
||||
handle_file_ln "$HOME/.dotfiles/local/bin/x-foreach" "$HOME/.local/bin/x-foreach"
|
||||
handle_file_ln "$HOME/.dotfiles/local/bin/x-multi-ping.pl" "$HOME/.local/bin/x-multi-ping.pl"
|
||||
handle_file_ln "$HOME/.dotfiles/local/bin/x-open-ports" "$HOME/.local/bin/x-open-ports"
|
||||
handle_file_ln "$HOME/.dotfiles/local/bin/x-ssl-expiry-date" "$HOME/.local/bin/x-ssl-expiry-date"
|
||||
handle_file_ln "$HOME/.dotfiles/local/bin/x-until-error" "$HOME/.local/bin/x-until-error"
|
||||
handle_file_ln "$HOME/.dotfiles/local/bin/x-until-success" "$HOME/.local/bin/x-until-success"
|
||||
handle_file_ln "$HOME/.dotfiles/local/bin/x-when-down" "$HOME/.local/bin/x-when-down"
|
||||
handle_file_ln "$HOME/.dotfiles/local/bin/x-when-up" "$HOME/.local/bin/x-when-up"
|
||||
handle_file_ln "$HOME/.dotfiles/rcrc" "$HOME/.rcrc"
|
||||
handle_file_ln "$HOME/.dotfiles/shellcheckrc" "$HOME/.shellcheckrc"
|
||||
handle_file_ln "$HOME/.dotfiles/ssh/allowed_signers" "$HOME/.ssh/allowed_signers"
|
||||
handle_file_ln "$HOME/.dotfiles/ssh/config" "$HOME/.ssh/config"
|
||||
handle_file_ln "$HOME/.dotfiles/vuerc" "$HOME/.vuerc"
|
||||
handle_file_ln "$HOME/.dotfiles/zshrc" "$HOME/.zshrc"
|
||||
@@ -1,28 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Install Go packages
|
||||
#
|
||||
# shellcheck source=shared.sh
|
||||
source "$HOME/.dotfiles/scripts/shared.sh"
|
||||
|
||||
if ! command -v go &> /dev/null; then
|
||||
msg "go hasn't been installed yet."
|
||||
else
|
||||
packages=(
|
||||
# sysadmin/scripting utilities, distributed as a single binary
|
||||
github.com/skx/sysbox@latest
|
||||
)
|
||||
|
||||
for pkg in "${packages[@]}"; do
|
||||
# Trim spaces
|
||||
pkg=${pkg// /}
|
||||
# Skip comments
|
||||
if [[ ${pkg:0:1} == "#" ]]; then continue; fi
|
||||
|
||||
msg_run "Installing go package:" "$pkg"
|
||||
go install "$pkg"
|
||||
echo ""
|
||||
done
|
||||
|
||||
msg_ok "Done"
|
||||
|
||||
fi
|
||||
@@ -36,26 +36,3 @@ until [ "$(which git)" ]; do
|
||||
echo -n "."
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# Install brew
|
||||
if [ "$(which brew)" ]; then
|
||||
echo 'Brew already installed'
|
||||
else
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
fi
|
||||
|
||||
bash "$HOME/.dotfiles/local/bin/dfm" brew install && "Installed Brewfile contents"
|
||||
bash "$HOME/.dotfiles/local/bin/dfm" dotfiles link && "Linked all dotfiles"
|
||||
|
||||
read -r -p "Do you want to set macOS defaults? (y/N) " yn
|
||||
|
||||
case $yn in
|
||||
[yY])
|
||||
bash "set-defaults.sh"
|
||||
;;
|
||||
*)
|
||||
echo "Skipping..."
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Done. Note that some of these changes require a logout/restart to take effect."
|
||||
|
||||
Reference in New Issue
Block a user