Last active
April 8, 2021 14:30
-
-
Save ahasverus/6ba380022b283b4dad9f5be2b1158b94 to your computer and use it in GitHub Desktop.
Shell Script to reinstall macOS X system
This file contains hidden or 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
#!/bin/sh | |
# chmod a+x ./macos-settings.sh | |
# sh ./macos-settings.sh | |
## [.] Install Command Line Tools ---- | |
sudo xcode-select --install | |
## [.] Install Homebrew Packages Manager ---- | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
## [.] Install Command Lines Utilitaries ---- | |
brew install --cask xquartz | |
brew install openjdk gfortran libgit2 libxml2 poppler geos gdal netcdf proj udunits | |
brew install docker docker-compose ffmpeg git htop imagemagick kepubify neofetch | |
brew install pandoc pandoc-citeproc postgresql rclone tree youtube-dl wget | |
## [.] Install Graphical Softwares ---- | |
brew install --cask firefox | |
brew install --cask nextcloud onedrive | |
brew install --cask audiobookbinder calibre vlc | |
brew install --cask microsoft-teams skype slack zoom | |
brew install --cask atom basictex docker inkscape mendeley r rstudio | |
brew install --cask cleanmymac keepassxc nordvpn the-unarchiver transmission | |
## [.] Configure Atom Editor ---- | |
apm install atom-material-ui atom-material-syntax | |
apm install atom-language-r file-icons git-diff-details language-docker | |
apm install language-knitr language-latex language-markdown minimap pdf-view | |
apm install tree-view-git-status | |
## [.] Install LaTeX ---- | |
open /usr/local/Caskroom/basictex/2021.0325/mactex-basictex-20210325.pkg | |
## [.] Install LaTeX Packages ---- | |
sudo tlmgr update --self | |
sudo tlmgr install biblatex changepage collection-fontsrecommended enumitem | |
sudo tlmgr install environ framed fontawesome inconsolata lastpage latexmk | |
sudo tlmgr install logreq makecell marvosym multirow mwe tabu textpos | |
sudo tlmgr install threeparttable threeparttablex titling tocloft trimspaces | |
sudo tlmgr install varwidth wrapfig xstring | |
## [.] Configure R ---- | |
export PATH="/Library/Frameworks/R.framework/Versions/4.0/Resources/bin:$PATH" >> ~/.zshrc | |
export PATH="/usr/local/opt/openjdk/bin:$PATH" >> ~/.zshrc | |
R CMD javareconf | |
wget https://gist.githubusercontent.com/ahasverus/edb4f037d19a1aab8e888f2960580f66/raw/87a60e4fd97e6e33eb4100e18f41754e43e990e7/Rsettings.R -O ~/Rsettings.R | |
Rscript ~/Rsettings.R | |
rm -f ~/Rsettings.R | |
wget https://gist.githubusercontent.com/ahasverus/8b41ceb0a9cf13107e5f4bf3d87bfb6b/raw/a2eac5e06837c2176a9495aa98a91df956694bcb/.Rprofile -O ~/.Rprofile | |
## [.] Install R Packages ---- | |
wget https://gist.githubusercontent.com/ahasverus/0406b2ceccc946b0748381a2d65ec1e3/raw/eb86050e7607a9873d9e0e640502b92092105469/Rpackages.R -O ~/Rpackages.R | |
Rscript ~/Rpackages.R | |
rm -f ~/Rpackages.R | |
## [.] Configure GIT ---- | |
git config --global color.diff auto | |
git config --global color.status auto | |
git config --global color.branch auto | |
git config --global user.name "Nicolas Casajus" | |
git config --global user.email "[email protected]" | |
git config --global github.user "ahasverus" | |
## [.] Install iTerm2 & OhMyZsh & PowerLevel10k ---- | |
brew install iterm2 | |
cd ~ | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k | |
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting | |
git clone https://github.com/zsh-users/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions | |
p10k configure | |
nano .zshrc | |
● Configure ZSH | |
source .zshrc | |
## [.] Configure PostgreSQL ---- | |
/usr/local/opt/postgres/bin/createuser -s postgres | |
brew services start postgresql | |
psql -U postgres | |
createdb cesab_dbms | |
psql cesab_dbms < ./cesab_dbms-20210404.sql | |
## [.] Manually ---- | |
● Microsoft Office 2016 | |
● Restaure secrets + Other files | |
● iTerm configuration | |
sudo chmod 600 ~/.ssh/id_rsa | |
sudo chmod 600 ~/.ssh/id_rsa.pub | |
sudo chmod 644 ~/.ssh/known_hosts | |
sudo chmod 755 ~/.ssh | |
## [.] Clean Formulas and Caches ---- | |
brew cleanup | |
rm -rf ~/Library/Caches/Homebrew/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment