-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.general-setup
31 lines (24 loc) · 866 Bytes
/
.general-setup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Mac defaults
## Show hidden files in Finder
defaults write com.apple.finder AppleShowAllFiles YES
killall Finder
# Set bash to default terminal
chsh -s /bin/bash
# Create bash_profile file
touch "$HOME/.bash_profile"
# Variables
BASH_PROFILE_PATH="$HOME/.bash_profile"
INDEX_DOTFILE_PATH="$HOME/.index-dotfile"
SOURCE_INDEX_DOTFILE_LINE="source ${INDEX_DOTFILE_PATH}"
# Install latest stable node
nvm install stable
## Use default Node version
nvm use default
## Check if .bash_profile exists in root directory. if not, create it
if [ ! -f $BASH_PROFILE_PATH ]
then
echo "profile file does not exist. Creating a profile file in user root directory."
touch $BASH_PROFILE_PATH
fi
## Append 'source ~/.index-dotfile' to profile file
grep -q "$SOURCE_INDEX_DOTFILE_LINE" "$BASH_PROFILE_PATH" || echo "$SOURCE_INDEX_DOTFILE_LINE" >> "$BASH_PROFILE_PATH"