vendor/gems/installit.sh in yakg-0.0.4 vs vendor/gems/installit.sh in yakg-0.0.6

- old
+ new

@@ -1,21 +1,25 @@ #!/bin/bash -x -# default mac os path -export PATH="/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin:/usr/local/sbin" +if [ "x$1" = "appleruby" ]; then + export PATH="/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin:/usr/local/sbin" +fi DIR="$( cd "$( dirname "$0" )" && pwd )" ; cd $DIR if ! [ -r `basename $0 2>/dev/null` ]; then echo "FAIL! can't cd to the parent of $0" exit 1 fi -if [ -r ruby ] && ! [ -d ruby ]; then - echo "FAIL! ./ruby exists and is not a directory" +export RUBY_VERSION=`ruby --version | cut -d \ -f 2 | cut -d . -f 1-2` +ruby --version + +if [ "x${RUBY_VERSION}" = "x" ]; then + echo "FAIL! can't figure out ruby version" exit 2 fi -rm -rf Gemfile.lock ruby +rm -rf Gemfile.lock "ruby/${RUBY_VERSION}" bundle install --path `pwd` FFI_C=`find ruby -type f -name ffi_c.bundle | head -n 1` if [ "x${FFI_C}" = "x" ]; then echo "FAIL! Couldn't install ffi"