mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
fix(bootstrap): Fix macOS script
This commit is contained in:
parent
d9aa8fafdb
commit
041a509481
4 changed files with 34 additions and 18 deletions
|
|
@ -14,7 +14,8 @@ echo "[ACTION] Request Human Takeover"
|
|||
xcode-select --install
|
||||
|
||||
# Press any key to continue (if Xcode Command Line Tools are installed)
|
||||
read -n 1 -s -r -p "Press any key to continue when xcode CLI tools are installed"
|
||||
echo "[ACTION] Press any key to continue when xcode CLI tools are installed"
|
||||
read -n 1
|
||||
|
||||
# System Preferences
|
||||
# Installation Sources
|
||||
|
|
@ -29,7 +30,9 @@ echo "[INFO] Installing Homebrew"
|
|||
echo "[ACTION] Request Human Input"
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
|
||||
read -n 1 -s -r -p "Press any key to continue when xcode CLI tools are installed"
|
||||
|
||||
echo "[ACTION] Press any key to continue when xcode CLI tools are installed"
|
||||
read -n 1
|
||||
|
||||
echo "[INFO] Cloning Dotfiles"
|
||||
|
||||
|
|
@ -45,6 +48,10 @@ echo "[INFO] Installing Homebrew Packages"
|
|||
eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||
brew bundle --file=$DOTFILES/bootstrap/macOS/Brewfile
|
||||
|
||||
# Setting up emacs
|
||||
ln -s /usr/local/opt/emacs-mac/Emacs.app /Applications/Emacs.app
|
||||
|
||||
|
||||
# Setting Default Apps
|
||||
|
||||
source $DOTFILES/bootstrap/macOS/duti.zsh
|
||||
|
|
@ -62,10 +69,12 @@ source $DOTFILES/tools/zsh/zshrc
|
|||
|
||||
echo "[INFO] Installing Rime"
|
||||
|
||||
git clone --depth 1 https://github.com/js0ny/Rime.git ~/Library/Rime
|
||||
git clone --depth 1 https://github.com/js0ny/rime_wanxiang_pro.git ~/Library/Rime
|
||||
cd ~/Library/Rime
|
||||
|
||||
just set_remote
|
||||
just init
|
||||
# just install_rime
|
||||
## Rime is installed via Brewfile
|
||||
just clone_plum
|
||||
|
||||
echo "[INFO] Installing Doom Emacs"
|
||||
|
|
|
|||
|
|
@ -16,15 +16,15 @@ echo "[INFO] Setting up symbolic links"
|
|||
for src in ${(k)linkDots}; do
|
||||
dest="${linkDots[$src]}"
|
||||
echo "Linking $src to $dest"
|
||||
# if [ -d "$src" ]; then
|
||||
# test -d $dest && mv $dest $dest.bak
|
||||
# mkdir -p $dest
|
||||
# ln -sf $src $dest
|
||||
# elif [ -f "$src" ]; then
|
||||
# dest_parent=$(dirname $dest)
|
||||
# test -d $dest_parent || mkdir -p $dest_parent
|
||||
# ln -sf $src $dest
|
||||
# else
|
||||
# echo "[ERROR] $src does not exist"
|
||||
# fi
|
||||
if [ -d "$src" ]; then
|
||||
test -d $dest && mv $dest $dest.bak
|
||||
# mkdir -p $dest
|
||||
ln -sf $src $dest
|
||||
elif [ -f "$src" ]; then
|
||||
dest_parent=$(dirname $dest)
|
||||
test -d $dest_parent || mkdir -p $dest_parent
|
||||
ln -sf $src $dest
|
||||
else
|
||||
echo "[ERROR] $src does not exist"
|
||||
fi
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue