Commit cd500787 authored by testing testuser's avatar testing testuser

Adds yes/no prompts, and common program install script

parent 5682ab86
#!/bin/sh
function enter_yesno {
while true ; do
echo -n "${1} (Y/N)? " 1>&2
read -n 1 reply
echo
case "$reply" in
Y*|y*) return 0 ;;
N*|n*) return 1 ;;
esac
echo "Invalid input, try again ..." 1>&2
done
}
# if they want LaTeX, install it
if enter_yesno "Install MacTex?"
then
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew tap caskroom/cask
brew cask install mactex
brew cask install texmaker
fi
#!/bin/sh
# Set up a fresh Macbook for IST. Run as root user or with sudo
# run from /Users/Shared/mac-scripts
# note: slow login may be helped by putting IPs of domain controllers: DC1, W1521003, W1521007
function enter_yesno {
while true ; do
echo -n "${1} (Y/N)? " 1>&2
read -n 1 reply
echo
case "$reply" in
Y*|y*) return 0 ;;
N*|n*) return 1 ;;
esac
echo "Invalid input, try again ..." 1>&2
done
}
# hostname = "USER INPUT"
read -p "Enter hostname (e.g. 'mnadmn001'): " hostname
......@@ -78,5 +92,12 @@ rm MacPass.zip
# download printers, install
# when domain-joined adding printers is easy
./mac_install_printers.sh
if enter_yesno "Install printers?"
then
./mac_install_printers.sh
fi
if enter_yesno "Install common programs?"
then
./install-common-programs.sh
fi
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