install: add homebrew installer, move to folders

This commit is contained in:
Charles Gould 2019-06-23 17:19:41 -04:00
parent b9e9909aa8
commit 37139d310f
9 changed files with 37 additions and 9 deletions

View File

@ -5,7 +5,7 @@ My personal configuration files.
##### Usage
1. Clone this repository into `~/.dotfiles`
2. Install Homebrew: https://brew.sh/
3. Install tools: `brew bundle install`
4. (Optional) Install more tools: `brew bundle install --file=Brewfile.opt`
2. Install [Homebrew](https://brew.sh/): `./install-brew.sh`
3. Install tools: `brew bundle install --file=brew/Brewfile`
4. (Optional) Install more tools: `brew bundle install --file=brew/Brewfile.opt`
5. Install everything else, including symlinks: `./install.sh`

View File

@ -27,7 +27,6 @@ test -d /sbin ; and set -x PATH $PATH /sbin
# Aliases
alias adventure='emacs -batch -l dunnet'
alias afk='pmset displaysleepnow'
alias dnsflush='sudo killall -HUP mDNSResponder'
alias java8="set -gx JAVA_HOME $JAVA_HOME_8"
alias java11="set -gx JAVA_HOME $JAVA_HOME_11"
alias md5sum="md5 -r $argv"

View File

@ -7,7 +7,7 @@ SETUVAR fish_color_autosuggestion:969896
SETUVAR fish_color_cancel:\x2dr
SETUVAR fish_color_command:c397d8
SETUVAR fish_color_comment:e7c547
SETUVAR fish_color_cwd:yellow
SETUVAR fish_color_cwd:green
SETUVAR fish_color_cwd_root:red
SETUVAR fish_color_end:c397d8
SETUVAR fish_color_error:d54e53

View File

@ -0,0 +1,8 @@
function dns_flush
switch (uname -s)
case Darwin
sudo killall -HUP mDNSResponder
case '*'
echo "Unsupported OS: "(uname -s)
end
end

21
install-brew.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/sh
# Check if Homebrew is already installed
if [ -x "$(command -v brew)" ]; then
echo "Homebrew is already installed."
exit 0
fi
# Install Homebrew by OS
case "$(uname -s)" in
Darwin)
echo "Mac OS"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
;;
Linux)
echo "Linux"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install)"
;;
*)
echo "Unsupported OS: $(uname -s)"
esac

View File

@ -6,7 +6,7 @@ DOTFILES="$HOME/.dotfiles"
mkdir -p "$HOME/.config"
# Create symlinks, forcing updates
ln -Fsv "$DOTFILES/.bashrc" "$HOME/.bashrc" # bash does not support XDG config
ln -Fsv "$DOTFILES/fish" "$HOME/.config"
ln -Fsv "$DOTFILES/nvim" "$HOME/.config"
ln -Fsv "$DOTFILES/git" "$HOME/.config"
ln -Fsv "$DOTFILES/bash/.bashrc" "$HOME/.bashrc" # Bash does not support XDG config
ln -Fsv "$DOTFILES/fish" "$HOME/.config"
ln -Fsv "$DOTFILES/nvim" "$HOME/.config"
ln -Fsv "$DOTFILES/git" "$HOME/.config"