-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmacOS-setup.sh
More file actions
executable file
·60 lines (53 loc) · 1.14 KB
/
macOS-setup.sh
File metadata and controls
executable file
·60 lines (53 loc) · 1.14 KB
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
#! /usr/bin/env bash
if [ -x "/usr/local/bin/brew" ];
then
# Update Homebrew
brew update
brew upgrade
else
# install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# CMake, Git, Python
brew install cmake
brew install git
brew install python3
# Conan installation
pip3 install conan conan_package_tools --upgrade
# Install editor
TMPDIR=$(mktemp -d)
EDITOR_ZIP="$TMPDIR/editor.zip"
CODE="https://go.microsoft.com/fwlink/?LinkID=620882"
ATOM="https://atom.io/download/mac"
while true;
do
echo "Which editor do you want to install?"
echo "1. Atom"
echo "2. VS Code"
echo "3. neither"
read -p "> "
case $REPLY in
1)
EDITOR="$ATOM"; break
;;
2)
EDITOR="$CODE"; break
;;
3)
EDITOR=none; break
;;
esac
done
if [ $EDITOR != none ];
then
curl -o "$EDITOR_ZIP" -L "$EDITOR"
if groups | grep -q admin;
then
pushd "/Applications"
else
pushd "$HOME/Applications"
fi
unzip -x "$EDITOR_ZIP"
popd
fi
rm -fr "$TMPDIR"