More
author |
Steve Losh <steve@stevelosh.com> |
date |
Wed, 08 May 2024 10:22:28 -0400 |
parents |
4673e928c08e |
children |
(none) |
#!/bin/bash
set -euo pipefail
function ensure_link {
test -L "$HOME/$2" || test ! -e "$HOME/$1" || ln -s "$HOME/$1" "$HOME/$2"
}
touch ~/.hushlogin
touch ~/.vimrc_local
mkdir -p ~/.local/share
mkdir -p ~/.config/fish
mkdir -p ~/.config/nvim
mkdir -p ~/.config/htop
mkdir -p ~/src/hg
mkdir -p ~/src/virtualenvs
mkdir -p ~/bin
mkdir -p ~/src
mkdir -p ~/.w3m
mkdir -p ~/.weechat
ensure_link "src/dotfiles/hgrc" ".hgrc"
test -d ~/.hg-git/ || hg clone "https://foss.heptapod.net/mercurial/hg-git/" "$HOME/.hg-git"
test -d ~/src/dulwich || git clone "https://github.com/jelmer/dulwich" "$HOME/src/dulwich"
ensure_link "src/dulwich/dulwich" "src/hg/dulwich"
test -d ~/src/dotfiles || hg clone https://hg.stevelosh.com/dotfiles ~/src/dotfiles
ensure_link "src/dotfiles/Xmodmap" ".Xmodmap"
ensure_link "src/dotfiles/abclrc" ".abclrc"
ensure_link "src/dotfiles/agignore" ".agignore"
ensure_link "src/dotfiles/bash_profile" ".bash_profile"
ensure_link "src/dotfiles/browsrc" ".browsrc"
ensure_link "src/dotfiles/ccl-init.lisp" ".ccl-init.lisp"
ensure_link "src/dotfiles/config-nvim-init.vim" ".config/nvim/init.vim"
ensure_link "src/dotfiles/ctags" ".ctags"
ensure_link "src/dotfiles/dunstrc" ".dunstrc"
ensure_link "src/dotfiles/eclrc" ".eclrc"
ensure_link "src/dotfiles/ffignore" ".ffignore"
ensure_link "src/dotfiles/fish/config.fish" ".config/fish/config.fish"
ensure_link "src/dotfiles/fish/functions" ".config/fish/functions"
ensure_link "src/dotfiles/gitconfig" ".gitconfig"
ensure_link "src/dotfiles/gitignore" ".gitignore"
ensure_link "src/dotfiles/gnuplot" ".gnuplot"
ensure_link "src/dotfiles/hgignore" ".hgignore"
ensure_link "src/dotfiles/lisprc" ".lisprc"
ensure_link "src/dotfiles/lispwords" ".lispwords"
ensure_link "src/dotfiles/mutt" ".mutt"
ensure_link "src/dotfiles/mutt/mailcap" ".mailcap"
ensure_link "src/dotfiles/mutt/muttrc" ".muttrc"
ensure_link "src/dotfiles/mutt/notmuch-config" ".notmuch-config"
ensure_link "src/dotfiles/psqlrc" ".psqlrc"
ensure_link "src/dotfiles/sbclrc" ".sbclrc"
ensure_link "src/dotfiles/shellcheckrc" ".shellcheckrc"
ensure_link "src/dotfiles/sqliterc" ".sqliterc"
ensure_link "src/dotfiles/stumpwm/stumpwmrc" ".stumpwmrc"
ensure_link "src/dotfiles/stumpwm/local-share-stumpwm" ".local/share/stumpwm"
ensure_link "src/dotfiles/vim" ".vim"
ensure_link "src/dotfiles/vim/vimrc" ".vimrc"
ensure_link "src/dotfiles/vim/vimrc-minimal" ".vimrc-minimal"
ensure_link "src/dotfiles/w3m-keymap" ".w3m/keymap"
ensure_link "src/dotfiles/w3m-config" ".w3m/config"
ensure_link "src/dotfiles/xbindkeysrc" ".xbindkeysrc"
ensure_link "src/dotfiles/xsessionrc" ".xsessionrc"
ensure_link "src/dotfiles/htoprc" ".config/htop/htoprc"
echo done