#!/bin/bash

mkdir tmp || exit 1
pushd tmp

bundle init
echo 'gem "rails"' >> Gemfile
bundle --path gempath
status=$?

popd
rm -fr tmp

exit $status
