Sha256: 719c3c62b186c9527250c2fc02e8a67d08a11d179c2c49733a1b2e50c331fab6

Contents?: true

Size: 707 Bytes

Versions: 11

Compression:

Stored size: 707 Bytes

Contents

#!/bin/bash

master() {
	echo "Would you like to install the RPS gem and what is needed for it?";
	process() {
		`sudo xcode-select --install`;
		`/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"`;
		`\curl -sSL https://get.rvm.io | bash -s stable --ruby`;
		`gem install PlayRockPaperScissorsGame`;
	}
	confirm() {
		echo "Press Y to install, or press N to cancel";
		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;
	} 
	init() {
		if confirm; then
			process;
		else
			exit;
		fi;
	}
	init;
}
master;

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
PlayRockPaperScissorsGame-1.9.0 exec/rps.bash
PlayRockPaperScissorsGame-1.8.9 exec/rps.bash
PlayRockPaperScissorsGame-1.8.8 exec/rps.bash
PlayRockPaperScissorsGame-1.8.6 exec/rps.bash
PlayRockPaperScissorsGame-1.8.5 exec/rps.bash
PlayRockPaperScissorsGame-1.8.4 exec/rps.bash
PlayRockPaperScissorsGame-1.8.3 exec/rps.bash
PlayRockPaperScissorsGame-1.8.1 exec/rps.bash
PlayRockPaperScissorsGame-1.8.0 exec/rps.bash
PlayRockPaperScissorsGame-1.7.9 exec/rps.bash
PlayRockPaperScissorsGame-1.7.8 exec/rps.bash