Skip to content

Commit 0137c09

Browse files
committed
Macの自動設定
1 parent 804009d commit 0137c09

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

mac/setup_misc.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ set -euo pipefail
33

44
# setup brew for macs
55
if [ "$(uname)" = "Darwin" ] && [ ! -f /usr/local/bin/brew ]; then
6-
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
6+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
77
fi
88

9-
cat brew_list.txt | xargs brew install
10-
cat brew_cask.txt | xargs brew install --cask
9+
cat "$SCRIPT_DIR/mac/brew_list.txt" | xargs brew install
10+
cat "$SCRIPT_DIR/mac/brew_cask.txt" | xargs brew install --cask
1111

1212
# java使わんからなぁ
1313
# setup sdkman for java

setup_mac_all.sh

100644100755
File mode changed.

setup_zsh_and_keys.sh

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,25 @@
11
#!/usr/bin/env bash
2-
cp ~/.zshrc ~/.zshrc.bak
2+
#!/bin/bash
3+
4+
# Backup .zshrc if it exists
5+
if [ -f ~/.zshrc ]; then
6+
cp ~/.zshrc ~/.zshrc.bak
7+
echo "Backed up existing .zshrc"
8+
fi
9+
10+
# Copy new .zshrc
311
cp -f _zshrc ~/.zshrc
4-
cp ~/.p10k.zsh ~/.p10k.zsh.bak
12+
echo "Copied new .zshrc"
13+
14+
# Backup .p10k.zsh if it exists
15+
if [ -f ~/.p10k.zsh ]; then
16+
cp ~/.p10k.zsh ~/.p10k.zsh.bak
17+
echo "Backed up existing .p10k.zsh"
18+
fi
19+
20+
# Copy new .p10k.zsh
521
cp -f _p10k.zsh ~/.p10k.zsh
22+
echo "Copied new .p10k.zsh"
623

724
# copy pub key
825
mkdir -p ~/.ssh/

0 commit comments

Comments
 (0)