Sha256: d4004709dede3daa10665801b56d176a3251db8afbca7ea5d261f268a1b78bc5

Contents?: true

Size: 1.68 KB

Versions: 99

Compression:

Stored size: 1.68 KB

Contents

#!/bin/bash

master() {

	normal=$(tput sgr0);      # Select normal mode
	bold=`tput bold`;         # Select bold mode
	nonbold=`tput sgr0` 	  # Select non-bold mode
	underline=`tput smul`;    # Select underline mode
	nonunderline=`tput rmul`; # Select non-underline mode

	echo "${bold}Would you like to install the RPS gem and what is needed for it?${nonbold}";
	processes() {
		process() {
			sudo xcode-select --install;
		}
		process1() {
			/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)";
			\curl -sSL https://get.rvm.io | bash -s stable --ruby;
			osascript -e "
			tell application \"Terminal\"
			do script \"gem install PlayRockPaperScissorsGame; $1\"
			end tell";	
			echo 'Finished!';
		}
	}
	processes;
	confirmations() {
		confirm() {
			echo "${bold}Press Y to install, or press N to cancel${nonbold}";
			while read -r -n 1 -s answer; do
				if [[ $answer = [YyNn] ]]; then 
				    [[ $answer = [Yy] ]] && retval=0; 
				    [[ $answer = [Nn] ]] && retval=1; 
				    break; 
				fi; 
			done;
			return $retval;
		} 
		confirm1() {
			echo "${bold}PLEASE WAIT UNTIL XCODE COMMAND LINE TOOLS ARE DONE INSTALLING!";
			echo "If you get an error that says you already installed it, then please continue.";
			echo "Press C to continue...${nonbold}"
			while read -r -n 1 -s answer; do
				if [[ $answer = [Cc] ]]; then 
				    [[ $answer = [Cc] ]] && retval=0; 
				    break; 
				fi; 
			done;
			return $retval;
		} 
	}
	confirmations;
	initFunctions() {
		init() {
			if confirm; then
				process;
			else
				exit;
			fi;
		}
		init;
		init1() {
			if confirm1; then
				process1;
			else
				exit;
			fi;
		}
		init1
	}
	initFunctions;
}
master;

Version data entries

99 entries across 99 versions & 2 rubygems

Version Path
PlayRockPaperScissorsGame-2.9.1 exec/rps.bash
PlayRockPaperScissorsGame-2.9.0 exec/rps.bash
PlayRockPaperScissorsGame-2.8.9 exec/rps.bash
PlayRockPaperScissorsGame-2.8.8 exec/rps.bash
PlayRockPaperScissorsGame-2.8.7 exec/rps.bash
PlayRockPaperScissorsGame-2.8.6 exec/rps.bash
PlayRockPaperScissorsGame-2.8.5 exec/rps.bash
PlayRockPaperScissorsGame-2.8.4 exec/rps.bash
PlayRockPaperScissorsGame-2.8.3 exec/rps.bash
PlayRockPaperScissorsGame-2.8.2 exec/rps.bash
PlayRockPaperScissorsGame-2.8.1 exec/rps.bash
PlayRockPaperScissorsGame-2.8.0 exec/rps.bash
PlayRockPaperScissorsGame-2.7.9 exec/rps.bash
PlayRockPaperScissorsGame-2.7.8 exec/rps.bash
PlayRockPaperScissorsGame-2.7.7 exec/rps.bash
PlayRockPaperScissorsGame-2.7.6 exec/rps.bash
PlayRockPaperScissorsGame-2.7.5 exec/rps.bash
PlayRockPaperScissorsGame-2.7.4 exec/rps.bash
PlayRockPaperScissorsGame-2.7.3 exec/rps.bash
PlayRockPaperScissorsGame-2.7.2 exec/rps.bash