Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Ask for the administrator password upfront
- sudo -v
- # Keep-alive: update existing `sudo` time stamp until `.osx` has finished
- while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
- # Update Apple Softwares
- echo ">>>>>>>>>> Update Apple Softwares"
- sudo softwareupdate -i -a
- echo ">>>>>>>>>> Install CommandLine Tools"
- if [ ! xcode-select --install 2>&1 | grep installed]; then
- sudo xcode-select --install
- fi
- echo ">>>>>>>>>> Start SSH Install"
- if test ! -d $HOME/.ssh
- then
- echo ">>>>> Add SSH"
- cp -Rf $HOME/Library/Mobile\ Documents/com~apple~CloudDocs/Documents/ssh $HOME/
- mv $HOME/ssh $HOME/.ssh
- chmod 400 $HOME/.ssh/id_rsa
- chmod 400 $HOME/.ssh/id_rsa_hike
- eval "$(ssh-agent -s)"
- ssh-add $HOME/.ssh/id_rsa
- ssh-add $HOME/.ssh/id_rsa_hike
- fi
- if test ! -d $HOME/.macOS
- then
- echo ">>>>>>>>>> Start Private Setup"
- git clone --recursive git@github.com:RahulKatariya/macOS.git $HOME/.macOS
- sh $HOME/.macOS-private/install
- else
- echo ">>>>>>>>>> Start Private Setup"
- sudo rm -rf $HOME/.macOS
- git clone --recursive git@github.com:RahulKatariya/macOS.git $HOME/.macOS
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement