-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
251 additions
and
240 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,6 @@ rails | |
solargraph | ||
|
||
# iOS development | ||
cocoapods | ||
synx | ||
xcode-install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,12 +68,7 @@ clone_or_update_repo() { | |
fi | ||
} | ||
|
||
load_envs() { | ||
export ANYENV_INIT_CACHE_DISABLED=1 | ||
source "$DOTFILES_PATH/shell/profile" | ||
} | ||
|
||
check_xcode_license_approved() { | ||
accept_xcode_license() { | ||
echo 'Agreeing to Xcode license...' | ||
|
||
if ! [[ "$(/usr/bin/xcrun clang 2>&1 || true)" =~ 'license' ]]; then | ||
|
@@ -85,6 +80,22 @@ check_xcode_license_approved() { | |
echo 'done' | ||
} | ||
|
||
install_rosetta2() { | ||
echo 'Installing Rosetta 2...' | ||
if [ -d /usr/libexec/rosetta ]; then | ||
echo 'skip (already installed)' | ||
return | ||
fi | ||
sudo softwareupdate --install-rosetta --agree-to-license | ||
echo 'done' | ||
} | ||
|
||
load_envs() { | ||
export ANYENV_INIT_CACHE_DISABLED=1 | ||
# shellcheck source=/dev/null | ||
. "$DOTFILES_PATH/shell/profile" | ||
} | ||
|
||
install_homebrew() { | ||
command -v 'brew' > /dev/null 2>&1 && return | ||
|
||
|
@@ -93,6 +104,15 @@ install_homebrew() { | |
echo 'done' | ||
} | ||
|
||
install_python3() { | ||
command -v 'python3' > /dev/null 2>&1 && return | ||
python3 --version > /dev/null 2>&1 && return | ||
|
||
echo 'Installing python3...' | ||
brew install [email protected] | ||
echo 'done' | ||
} | ||
|
||
install_ansible() { | ||
command -v 'ansible' > /dev/null 2>&1 && return | ||
|
||
|
@@ -101,16 +121,6 @@ install_ansible() { | |
echo 'done' | ||
} | ||
|
||
install_rosetta2() { | ||
echo 'Installing Rosetta 2...' | ||
if [ -d /usr/libexec/rosetta ]; then | ||
echo 'skip (already installed)' | ||
return | ||
fi | ||
sudo softwareupdate --install-rosetta --agree-to-license | ||
echo 'done' | ||
} | ||
|
||
run_provisioning() { | ||
echo 'Provisioning...' | ||
|
||
|
@@ -140,12 +150,13 @@ main() { | |
print_header | ||
check_os | ||
clone_or_update_repo | ||
check_xcode_license_approved | ||
accept_xcode_license | ||
install_rosetta2 | ||
|
||
load_envs | ||
install_homebrew | ||
install_python3 | ||
install_ansible | ||
install_rosetta2 | ||
run_provisioning "$@" | ||
} | ||
|
||
|
Oops, something went wrong.