diff options
Diffstat (limited to 'bin/provision.sh')
-rwxr-xr-x | bin/provision.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/bin/provision.sh b/bin/provision.sh new file mode 100755 index 0000000..cc4f726 --- /dev/null +++ b/bin/provision.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +set -o errexit -o nounset -o pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +cp "$SCRIPT_DIR/make.conf" /etc/portage/make.conf +if [[ -d /etc/portage/package.accept_keywords/ ]]; then + rm -r /etc/portage/package.accept_keywords/ +fi +if [[ -d /etc/portage/package.use/ ]]; then + rm -r /etc/portage/package.use/ +fi + +emerge-webrsync +emerge --metadata + +RUBIES="dev-lang/ruby:1.9 dev-lang/ruby:2.0 dev-lang/ruby:2.1 dev-lang/ruby:2.2" +set +e +emerge --pretend --quiet $RUBIES +if [[ $? == 1 ]]; then + emerge --autounmask-write $RUBIES + etc-update --automode -5 +fi +set -e +emerge --noreplace --quiet $RUBIES |