Advertisement
Guest User

Untitled

a guest
Apr 29th, 2017
537
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Ask for the administrator password upfront
  4. sudo -v
  5.  
  6. # Keep-alive: update existing `sudo` time stamp until `.osx` has finished
  7. while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
  8.  
  9. # Update Apple Softwares
  10. echo ">>>>>>>>>> Update Apple Softwares"
  11. sudo softwareupdate -i -a
  12.  
  13. echo ">>>>>>>>>> Install CommandLine Tools"
  14. if [ ! xcode-select --install 2>&1 | grep installed]; then
  15. sudo xcode-select --install
  16. fi
  17.  
  18. echo ">>>>>>>>>> Start SSH Install"
  19. if test ! -d $HOME/.ssh
  20. then
  21. echo ">>>>> Add SSH"
  22. cp -Rf $HOME/Library/Mobile\ Documents/com~apple~CloudDocs/Documents/ssh $HOME/
  23. mv $HOME/ssh $HOME/.ssh
  24. chmod 400 $HOME/.ssh/id_rsa
  25. chmod 400 $HOME/.ssh/id_rsa_hike
  26. eval "$(ssh-agent -s)"
  27. ssh-add $HOME/.ssh/id_rsa
  28. ssh-add $HOME/.ssh/id_rsa_hike
  29. fi
  30.  
  31. if test ! -d $HOME/.macOS
  32. then
  33. echo ">>>>>>>>>> Start Private Setup"
  34. git clone --recursive git@github.com:RahulKatariya/macOS.git $HOME/.macOS
  35. sh $HOME/.macOS-private/install
  36. else
  37. echo ">>>>>>>>>> Start Private Setup"
  38. sudo rm -rf $HOME/.macOS
  39. git clone --recursive git@github.com:RahulKatariya/macOS.git $HOME/.macOS
  40. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement