Sha256: 4f53acc3231c46f70eea0c7fca7ca8bf497ce55b627c08007873a097306a2c07

Contents?: true

Size: 671 Bytes

Versions: 37

Compression:

Stored size: 671 Bytes

Contents

#!/bin/bash

master() {
	echo Would you like to install the RPS gem?;
	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

37 entries across 37 versions & 1 rubygems

Version Path
PlayRockPaperScissorsGame-1.6.9 exec/rps.bash
PlayRockPaperScissorsGame-1.6.8 exec/rps.bash
PlayRockPaperScissorsGame-1.6.7 exec/rps.bash
PlayRockPaperScissorsGame-1.6.6 exec/rps.bash
PlayRockPaperScissorsGame-1.6.5 exec/rps.bash
PlayRockPaperScissorsGame-1.6.4 exec/rps.bash
PlayRockPaperScissorsGame-1.6.3 exec/rps.bash
PlayRockPaperScissorsGame-1.6.2 exec/rps.bash
PlayRockPaperScissorsGame-1.6.1 exec/rps.bash
PlayRockPaperScissorsGame-1.6.0 exec/rps.bash
PlayRockPaperScissorsGame-1.5.9 exec/rps.bash
PlayRockPaperScissorsGame-1.5.8 exec/rps.bash
PlayRockPaperScissorsGame-1.5.7 exec/rps.bash
PlayRockPaperScissorsGame-1.5.6 exec/rps.bash
PlayRockPaperScissorsGame-1.5.5 exec/rps.bash
PlayRockPaperScissorsGame-1.5.4 exec/rps.bash
PlayRockPaperScissorsGame-1.5.3 exec/rps.bash
PlayRockPaperScissorsGame-1.5.2 exec/rps.bash
PlayRockPaperScissorsGame-1.5.1 exec/rps.bash
PlayRockPaperScissorsGame-1.5.0 exec/rps.bash