install: add homebrew installer, move to folders
This commit is contained in:
parent
b9e9909aa8
commit
37139d310f
@ -5,7 +5,7 @@ My personal configuration files.
|
|||||||
##### Usage
|
##### Usage
|
||||||
|
|
||||||
1. Clone this repository into `~/.dotfiles`
|
1. Clone this repository into `~/.dotfiles`
|
||||||
2. Install Homebrew: https://brew.sh/
|
2. Install [Homebrew](https://brew.sh/): `./install-brew.sh`
|
||||||
3. Install tools: `brew bundle install`
|
3. Install tools: `brew bundle install --file=brew/Brewfile`
|
||||||
4. (Optional) Install more tools: `brew bundle install --file=Brewfile.opt`
|
4. (Optional) Install more tools: `brew bundle install --file=brew/Brewfile.opt`
|
||||||
5. Install everything else, including symlinks: `./install.sh`
|
5. Install everything else, including symlinks: `./install.sh`
|
||||||
|
@ -27,7 +27,6 @@ test -d /sbin ; and set -x PATH $PATH /sbin
|
|||||||
# Aliases
|
# Aliases
|
||||||
alias adventure='emacs -batch -l dunnet'
|
alias adventure='emacs -batch -l dunnet'
|
||||||
alias afk='pmset displaysleepnow'
|
alias afk='pmset displaysleepnow'
|
||||||
alias dnsflush='sudo killall -HUP mDNSResponder'
|
|
||||||
alias java8="set -gx JAVA_HOME $JAVA_HOME_8"
|
alias java8="set -gx JAVA_HOME $JAVA_HOME_8"
|
||||||
alias java11="set -gx JAVA_HOME $JAVA_HOME_11"
|
alias java11="set -gx JAVA_HOME $JAVA_HOME_11"
|
||||||
alias md5sum="md5 -r $argv"
|
alias md5sum="md5 -r $argv"
|
||||||
|
@ -7,7 +7,7 @@ SETUVAR fish_color_autosuggestion:969896
|
|||||||
SETUVAR fish_color_cancel:\x2dr
|
SETUVAR fish_color_cancel:\x2dr
|
||||||
SETUVAR fish_color_command:c397d8
|
SETUVAR fish_color_command:c397d8
|
||||||
SETUVAR fish_color_comment:e7c547
|
SETUVAR fish_color_comment:e7c547
|
||||||
SETUVAR fish_color_cwd:yellow
|
SETUVAR fish_color_cwd:green
|
||||||
SETUVAR fish_color_cwd_root:red
|
SETUVAR fish_color_cwd_root:red
|
||||||
SETUVAR fish_color_end:c397d8
|
SETUVAR fish_color_end:c397d8
|
||||||
SETUVAR fish_color_error:d54e53
|
SETUVAR fish_color_error:d54e53
|
||||||
|
8
fish/functions/dns_flush.fish
Normal file
8
fish/functions/dns_flush.fish
Normal 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
21
install-brew.sh
Executable 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
|
@ -6,7 +6,7 @@ DOTFILES="$HOME/.dotfiles"
|
|||||||
mkdir -p "$HOME/.config"
|
mkdir -p "$HOME/.config"
|
||||||
|
|
||||||
# Create symlinks, forcing updates
|
# Create symlinks, forcing updates
|
||||||
ln -Fsv "$DOTFILES/.bashrc" "$HOME/.bashrc" # bash does not support XDG config
|
ln -Fsv "$DOTFILES/bash/.bashrc" "$HOME/.bashrc" # Bash does not support XDG config
|
||||||
ln -Fsv "$DOTFILES/fish" "$HOME/.config"
|
ln -Fsv "$DOTFILES/fish" "$HOME/.config"
|
||||||
ln -Fsv "$DOTFILES/nvim" "$HOME/.config"
|
ln -Fsv "$DOTFILES/nvim" "$HOME/.config"
|
||||||
ln -Fsv "$DOTFILES/git" "$HOME/.config"
|
ln -Fsv "$DOTFILES/git" "$HOME/.config"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user