#!/bin/bash #/ NAME #/ local-helper -- resets environment for another bundle exec #/ #/ SYNOPSIS #/ #/ local-helper command args ... # figure out the project root under which bin, lib live shome="$(cd -P -- "$(dirname -- "$BASH_SOURCE")/.." && pwd -P)" # load a jason bourne library source "$shome/libexec/_treadstone" # entry point function main { unset GEM_HOME BUNDLE_GEMFILE RUBYOPT bundle check 2>&1 >/dev/null || { bundle install --quiet --local --path vendor/bundle || bundle check > /dev/null; } exec bundle exec "$@" } require sub "$BASH_SOURCE" "$@"