-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfirst.sh
118 lines (105 loc) · 2.89 KB
/
first.sh
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#!/usr/bin/env bash
set -eo pipefail
# Chezmoi can run this file but since its only run once on new machines, I'd
# rather just run this manually when needed
# Install command from brew.sh
function get_brew {
echo "Installing brew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
}
# Install brew program if not already installed
function brew_install {
program=$1
args=$*
echo "Brew: Installing '$program' if not already installed. Otherwise continue..."
#brew list $program &> /dev/null || brew install $args
if brew list $program &> /dev/null
then
echo "'$program' already installed"
else
echo "'$program' not installed, installing..."
brew install $args
fi
}
# # Note: Looks like brew will now install these if they haven't been installed yet
# # - https://www.freecodecamp.org/news/install-xcode-command-line-tools/
# # - To verify: 'xcode-select -p' -> '/Library/Developer/CommandLineTools'
# # Check if apple command line tools have been installed (this command will fail
# # if the command line tools have not been installed)
# echo "Checking if Apple's command line tools have been installed..."
# if git --version &> /dev/null
# then
# echo "Command line tools installed, continuing"
# else
# echo "Apple's command line tools have not been installed (install with 'xcode-select —install'), exiting"
# exit 1
# fi
# @Note: I don't think this is needed anymore
# # Check if the JDK has been installed
# echo "Checking if the JDK has been installed..."
# if java -version &> /dev/null
# then
# echo "JDK has been installed, continuing"
# else
# echo "The JDK needs to be installed, exiting"
# exit 1
# fi
# Get brew if not installed
#which brew > /dev/null || get_brew
echo "Checking if brew has been installed..."
if which brew &> /dev/null
then
echo "Brew has been installed, continuing"
else
echo "Brew not installed, installing brew..."
get_brew
fi
# Install packages
brew_install bash
brew_install git
brew_install coreutils
brew_install findutils
brew_install fd
brew_install fzf
brew_install gawk
brew_install gnu-sed
brew_install grip
brew_install jq
brew_install pyenv
brew_install python
#brew_install reattach-to-user-namespace # I don't think this is needed with newer versions of tmux
brew_install rename
brew_install ripgrep
brew_install tmux
brew_install tokei
brew_install tree
brew_install vim
brew_install neovim
brew_install wget
echo
# Notable packages/programs that we may want to also install
echo "Finished installing base packages. You may want to optionally install the following:
UI/non-brew installs:
- Docker desktop
- iTerm2
- Slack
- Intellij/Pycharm
- Zoom
- Spotify
Other optional cli/brew packages you may want to install:
- rust (via rustup)
- gcc/gdb
- cmake
- dos2unix
- htop
- k9s
- go
- lua
- nmap
- asdf
- exa
- bat
- git-delta"
echo
echo "Done"
echo