1
0
mirror of https://github.com/danbee/mac-setup synced 2025-03-04 08:39:10 +00:00

Change shell

This commit is contained in:
Daniel Barber 2019-04-23 08:57:56 -04:00
parent a67e85a036
commit 5f4e1e18ee
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8
2 changed files with 16 additions and 0 deletions

9
lib/shell.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
SHELL_PATH=$(command -v zsh)
if ! grep "$SHELL_PATH" /etc/shells > /dev/null 2>&1 ; then
sudo sh -c "echo $SHELL_PATH >> /etc/shells"
fi
sudo chsh -s "$SHELL_PATH" "$USER"

View File

@ -12,6 +12,9 @@ step() {
echo "${YELLOW} ${WHITE}${BOLD}$1${NC} ${YELLOW}${NC}"
}
# Ask for the administrator password upfront
sudo -v
# Generate an SSH key if one does not already exist
if [ ! -f "$HOME/.ssh/id_ed25519.pub" ]; then
step "Generating SSH key"
@ -54,6 +57,10 @@ brew bundle --file="$MAC_SETUP_DIR/Brewfile"
step "Installing dotfiles"
"$MAC_SETUP_DIR/lib/dotfiles.sh"
# Change the shell
step "Changing shell to zsh"
"$MAC_SETUP_DIR/lib/shell.sh"
# Setup git author
step "Set git author"
"$MAC_SETUP_DIR/lib/git_author.sh"