<commit_before>#!/bin/bash

# Edit 20170306
v_github_dir="initsh.github.io/bash"
v_script_name="centos6/awscli.sh"

# functions
. <(curl -LRs "${v_github_dir}/functions.sh") || echo "$(date -Is) [ERROR]: Failed to load https://${v_github_dir}/functions.sh"

{
	LogInfo "Start \"${v_script_name}\"."
	
	v_url_getpip="https://bootstrap.pypa.io/get-pip.py"
	
	# pip
	if [ "$(pip --help >/dev/null 2>&1; echo $?)" -eq 127 ]
	then
		LogInfo "Run \"get-pip.py\"."
		python <(curl -LRs "${v_url_getpip}")
		if [ "$(pip --help >/dev/null 2>&1; echo $?)" -eq 127 ]
		then
			LogError "Failed to install \"pip\"."
			exit 1
		fi
	fi
	
	# awscli
	if [ "$(aws --help >/dev/null 2>&1; echo $?)" -eq 127 ]
	then
		LogInfo "bash# pip install awscli"
		pip install awscli
		if [ "$(aws --help >/dev/null 2>&1; echo $?)" -eq 127 ]
		then
			LogError "Failed to install \"awscli\"."
			exit 1<commit_msg>Update awscli.sh<commit_after>#!/bin/bash

# Edit 20170306
v_github_dir="https://raw.githubusercontent.com/initsh/initsh.github.io/master/bash"
v_script_name="centos6/awscli.sh"

# functions
. <(curl -LRs "${v_github_dir}/functions.sh") || echo "$(date -Is) [ERROR]: Failed to load https://${v_github_dir}/functions.sh"

{
	LogInfo "Start \"${v_script_name}\"."
	
	v_url_getpip="https://bootstrap.pypa.io/get-pip.py"
	
	# pip
	if [ "$(pip --help >/dev/null 2>&1; echo $?)" -eq 127 ]
	then
		LogInfo "Run \"get-pip.py\"."
		python <(curl -LRs "${v_url_getpip}")
		if [ "$(pip --help >/dev/null 2>&1; echo $?)" -eq 127 ]
		then
			LogError "Failed to install \"pip\"."
			exit 1
		fi
	fi
	
	# awscli
	if [ "$(aws --help >/dev/null 2>&1; echo $?)" -eq 127 ]
	then
		LogInfo "bash# pip install awscli"
		pip install awscli
		if [ "$(aws --help >/dev/null 2>&1; echo $?)" -eq 127 ]
		then
			LogError "Failed to install \"awscli\"."
			exit 1
{'fraction_non_alphanumeric': 0.20460778935820076, 'fraction_numerical': 0.034009873834339004, 'mean_word_length': 3.164383561643836, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 19, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1964546', 'n_tokens_mistral': 866, 'n_tokens_neox': 737, 'n_words': 180}