Commit 21d8d653 authored by Peter NORTHUP's avatar Peter NORTHUP

Homebrew should install correctly (as user)

parent 69c199cf
#!/bin/sh #!/bin/bash
: ${username=$SUDO_USER}
function enter_yesno { function enter_yesno {
while true ; do while true ; do
...@@ -16,10 +17,10 @@ function enter_yesno { ...@@ -16,10 +17,10 @@ function enter_yesno {
# if they want LaTeX, install it # if they want LaTeX, install it
if enter_yesno "Install MacTex?" if enter_yesno "Install MacTex?"
then then
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" sudo -u $username /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew tap caskroom/cask sudo -u $username brew tap caskroom/cask
brew cask install mactex sudo -u $username brew cask install mactex
brew cask install texmaker sudo -u $username brew cask install texmaker
fi fi
# if they want Office2016, install it # if they want Office2016, install it
......
...@@ -131,5 +131,5 @@ rm "/Users/$username/openvpn-$username.zip" ...@@ -131,5 +131,5 @@ rm "/Users/$username/openvpn-$username.zip"
rm -rf "/Users/$username/openvpn" rm -rf "/Users/$username/openvpn"
# cleanup # cleanup
history -c sudo -u $username history -c
rm /Users/$username/.bash_history rm /Users/$username/.bash_history
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment