commit
				
					
						678ce2bfaa
					
				
			
		
					 5 changed files with 10 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -24,6 +24,7 @@ state="$(cat "$__object/parameter/state")"
 | 
			
		|||
 | 
			
		||||
if [ "${state}" = "present" ]; then
 | 
			
		||||
    # Download docker-compose file
 | 
			
		||||
    #shellcheck disable=SC2016
 | 
			
		||||
    echo 'curl -L "https://github.com/docker/compose/releases/download/'"${version}"'/docker-compose-$(uname -s)-$(uname -m)" -o /tmp/docker-compose'
 | 
			
		||||
    echo 'mv /tmp/docker-compose /usr/local/bin/docker-compose'
 | 
			
		||||
    # Change permissions
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,3 +1,4 @@
 | 
			
		|||
#!/bin/sh -e
 | 
			
		||||
 | 
			
		||||
# shellcheck disable=SC2016
 | 
			
		||||
__line go_in_path --line 'export PATH=/usr/local/go/bin:$PATH' --file /etc/profile
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -32,4 +32,5 @@ else
 | 
			
		|||
   name="$__object_id"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# shellcheck disable=SC2016
 | 
			
		||||
equery -q l -F '$cp $fullversion' "$name" || true
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -25,7 +25,9 @@ if [ ! -e "~$user/.rvm/scripts/rvm" ] ; then
 | 
			
		|||
   exit 0
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# shellcheck disable=SC2016
 | 
			
		||||
if su - "$user" -c 'source ~/.rvm/scripts/rvm; rvm list strings | grep -q "^$ruby\$"'; then
 | 
			
		||||
    # shellcheck disable=SC2016
 | 
			
		||||
    if su - "$user" -c 'source ~/.rvm/scripts/rvm; rvm use "$ruby" > /dev/null; rvm gemset list strings | cut -f 1 -d " " | grep -q "^$gemsetname\$"'; then
 | 
			
		||||
      echo "present"
 | 
			
		||||
      exit 0
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -62,7 +62,9 @@ fetch_file() {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
fetch_and_prepare_file() {
 | 
			
		||||
   # shellcheck disable=SC2016
 | 
			
		||||
   printf 'tmpdir="$(mktemp -d --tmpdir="/tmp" "%s")"\n' "${__type##*/}.XXXXXXXXXX"
 | 
			
		||||
   # shellcheck disable=SC2016
 | 
			
		||||
   printf 'cd "$tmpdir"\n'
 | 
			
		||||
   # shellcheck disable=SC2059
 | 
			
		||||
   printf "$fetch_command > \"%s\"\n" "$source" "$source_file_name"
 | 
			
		||||
| 
						 | 
				
			
			@ -70,6 +72,7 @@ fetch_and_prepare_file() {
 | 
			
		|||
   # shellcheck disable=SC2059
 | 
			
		||||
   printf "$prepare_command > \"%s\"\n" "$source_file_name" "$stage_file"
 | 
			
		||||
   printf 'cd - >/dev/null\n'
 | 
			
		||||
   # shellcheck disable=SC2016
 | 
			
		||||
   printf 'rm -rf "$tmpdir"\n'
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue