summary refs log tree commit diff
path: root/install.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xinstall.sh30
1 files changed, 21 insertions, 9 deletions
diff --git a/install.sh b/install.sh
index 4525c1ab..13d0d99b 100755
--- a/install.sh
+++ b/install.sh
@@ -2,23 +2,35 @@
 
 # Create symlinks in ~ for files in the current directory.
 
-set -e
+set -o errexit -o nounset -o pipefail
 
 error() {
   echo "$1"
   exit 1
 }
 
-paths=$(find $PWD -type f -not \( -path '*/.git/*' -o -path '*/Library/*' -o -name '.*.sw?' -o -name 'README.md' -o -name '*.sh' -o -name '*.plist' \))
+link() {
+  local source_path="$PWD/$1"
+  local dest_path="$HOME/$1"
 
-for source_path in $paths; do
-  rel_path="${source_path#$PWD/}"
-  dest_path="$HOME/$rel_path"
-
-  [ -h "$dest_path" ] && continue
+  [ -h "$dest_path" ] && return
   [ -e "$dest_path" ] && error "$dest_path exists"
 
   mkdir -p "$(dirname $dest_path)"
   ln -s "$source_path" "$dest_path"
-  echo "$rel_path"
-done
+  echo "$1"
+}
+
+link .config/git/config
+link .config/git/ignore
+link .config/nvim/autoload/pathogen.vim
+link .config/nvim/colors/gruvbox.vim
+link .config/nvim/init.vim
+link .gnupg/gpg-agent.conf
+link .psqlrc
+link .ssh/config
+link .tmux.conf
+link .vim/autoload/pathogen.vim
+link .vim/colors/gruvbox.vim
+link .vimrc
+link .zshrc
>2021-09-21Recalculate various lengths only as neededJune McEnroe 2021-09-21Rewrite pngo, add explicit optionsJune McEnroe 2021-09-16Fix /* **/ comment matchingJune McEnroe 2021-09-15Remove typer, add downgrade to READMEJune McEnroe 2021-09-15Set bot mode on downgradeJune McEnroe 2021-09-15Enter capsicum in downgradeJune McEnroe 2021-09-15Factor out common parts of downgrade messagesJune McEnroe 2021-09-14Add downgrade IRC botJune McEnroe 2021-09-14Sort by title if authors matchJune McEnroe 2021-09-13Swap-remove tags as they're foundJune McEnroe 2021-09-12Replace htagml regex with strncmpJune McEnroe 2021-09-11Also defer printing comment for lone close-parensJune McEnroe 2021-09-10Publish "git-comment"June McEnroe 2021-09-10Add git comment --pretty optionJune McEnroe 2021-09-08Defer printing comment if line is blank or closing braceJune McEnroe 2021-09-08Up default min-repeat to 30 linesJune McEnroe 2021-09-08Handle dirty lines in git-commentJune McEnroe 2021-09-08Document and install git-commentJune McEnroe 2021-09-08Add repeat and all options to git-commentJune McEnroe 2021-09-08Add group threshold to git-commentJune McEnroe