-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
41 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,10 @@ | ||
.PHONY: install brew brew-restore | ||
|
||
install: | ||
./install | ||
./scripts/install | ||
|
||
# Save snapshot of all Homebrew packages to macos/brewfile | ||
brew: | ||
brew bundle dump -f --file=config/os/macos/brewfile | ||
brew bundle --force cleanup --file=config/os/macos/brewfile | ||
|
||
# Restore Homebrew packages | ||
brew-restore: | ||
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install | ruby | ||
brew update | ||
brew upgrade | ||
brew install mas | ||
brew bundle install --file=config/os/macos/brewfile | ||
brew bundle install --file=brew/brewfile | ||
brew cleanup |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
SOURCE_CONFIG_DIR="$PWD/config" | ||
SOURCE_MODULES_DIR="$PWD/modules" | ||
TARGET_CONFIG_DIR="$HOME/.config" | ||
|
||
function link_config() { | ||
local source=$1 | ||
local target=$2 | ||
|
||
echo "Checking '${source}'..." | ||
if [ ! -L ${target} ]; then | ||
echo "=> Linking '${source}' to '${target}'..." | ||
ln -s ${source} ${target} | ||
fi | ||
} | ||
|
||
# shell prompt for zsh, fish | ||
link_config $SOURCE_CONFIG_DIR/starship/starship.toml $TARGET_CONFIG_DIR/starship.toml | ||
|
||
# zsh | ||
link_config $SOURCE_MODULES_DIR/zgen $HOME/.zgen | ||
link_config $SOURCE_CONFIG_DIR/zsh/zshrc.zsh $HOME/.zshrc | ||
link_config $SOURCE_CONFIG_DIR/zsh $TARGET_CONFIG_DIR/zsh | ||
|
||
# fish | ||
link_config $SOURCE_CONFIG_DIR/fish $TARGET_CONFIG_DIR/fish | ||
|
||
# nvim | ||
link_config $SOURCE_MODULES_DIR/nvchad $TARGET_CONFIG_DIR/nvim | ||
link_config $SOURCE_CONFIG_DIR/nvim/custom $TARGET_CONFIG_DIR/nvim/lua/custom | ||
|
||
# tools | ||
link_config $SOURCE_CONFIG_DIR/htop $TARGET_CONFIG_DIR/htop | ||
link_config $SOURCE_CONFIG_DIR/tmux $TARGET_CONFIG_DIR/tmux | ||
link_config $SOURCE_CONFIG_DIR/iterm2 $TARGET_CONFIG_DIR/iterm2 |