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