495491e3e589

More
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Thu, 16 Jan 2020 12:53:00 -0500
parents 22b96790d57c
children 635a82eca2d7
branches/tags (none)
files bin/bootstrap.sh servers/bin/bootstrap.sh

Changes

--- a/bin/bootstrap.sh	Thu Jan 16 12:49:06 2020 -0500
+++ b/bin/bootstrap.sh	Thu Jan 16 12:53:00 2020 -0500
@@ -1,8 +1,6 @@
 #!/bin/bash
-# THIS IS A WORK IN PROGRESS
-# BE CAREFUL, DAMMIT
 
-set -e
+set -euo pipefail
 
 function ensure_link {
     test -L "$HOME/$2" || test ! -e "$HOME/$1" || ln -s "$HOME/$1" "$HOME/$2"
@@ -24,7 +22,7 @@
 
 ensure_link "src/dulwich/dulwich" "src/hg/dulwich"
 
-test -d ~/src/dotfiles || hg clone http://bitbucket.org/sjl/dotfiles ~/src/dotfiles
+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"
--- a/servers/bin/bootstrap.sh	Thu Jan 16 12:49:06 2020 -0500
+++ b/servers/bin/bootstrap.sh	Thu Jan 16 12:53:00 2020 -0500
@@ -1,10 +1,26 @@
 #!/usr/bin/env bash
 
-function make_link() {
-    test -e "$HOME/$2" || ln -s "$HOME/dotfiles/$1" "$HOME/$2"
+set -euo pipefail
+
+function ensure_link {
+    test -L "$HOME/$2" || test ! -e "$HOME/$1" || ln -s "$HOME/$1" "$HOME/$2"
 }
 
-eval "$(dircolors -b ~/.dircolors)"
+mkdir -p ~/.config/fish
+mkdir -p ~/.config/nvim
+mkdir -p ~/src/hg
+mkdir -p ~/bin
+mkdir -p ~/src
 
-make_link bash_profile .bash_profile
-make_link dircolors .dircolors
+ensure_link "src/dotfiles/hgrc"              ".hgrc"
+ensure_link "src/dotfiles/bash_profile"      ".bash_profile"
+ensure_link "src/dotfiles/dircolors"         ".dircolors"
+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/hgignore"          ".hgignore"
+ensure_link "src/dotfiles/tmux/tmux.conf"    ".tmux.conf"
+ensure_link "src/dotfiles/vim"               ".vim"
+ensure_link "src/dotfiles/vim/vimrc"         ".vimrc"