diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2014-05-15 15:46:14 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2014-05-15 15:46:14 -0700 |
commit | 03f488462b32f90f4d66af94a52fd74482549af8 (patch) | |
tree | 9e16a5469283590adcede60e58a28cb94bab5cde | |
parent | 58801104dc5af29a07b84345751dd0907d85cc71 (diff) | |
download | libyajl2-gem-03f488462b32f90f4d66af94a52fd74482549af8.tar.gz |
add freebsd support
-rw-r--r-- | .kitchen.yml | 19 | ||||
-rwxr-xr-x | bootstrap.sh | 20 |
2 files changed, 20 insertions, 19 deletions
diff --git a/.kitchen.yml b/.kitchen.yml index e7c9830..441605e 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -10,29 +10,12 @@ provisioner: platforms: - name: ubuntu-10.04 - driver_config: - box: opscode-ubuntu-10.04 - box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-10.04_chef-provisionerless.box - name: ubuntu-12.04 - driver_config: - box: opscode-ubuntu-12.04 - box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-12.04_chef-provisionerless.box - name: ubuntu-12.10 - driver_config: - box: opscode-ubuntu-12.10 - box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-12.10_chef-provisionerless.box - name: ubuntu-13.04 - driver_config: - box: opscode-ubuntu-13.04 - box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-13.04_chef-provisionerless.box - name: ubuntu-13.10 - driver_config: - box: opscode-ubuntu-13.10 - box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-13.10_chef-provisionerless.box - name: ubuntu-14.04 - driver_config: - box: opscode-ubuntu-14.04 - box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-14.04_chef-provisionerless.box + - name: freebsd-9.2 suites: - name: default diff --git a/bootstrap.sh b/bootstrap.sh index 18c3511..f745294 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -7,11 +7,19 @@ set -e set -x +machine=`uname -m` +os=`uname -s` + if test -f "/etc/lsb-release" && grep -q DISTRIB_ID /etc/lsb-release; then platform=`grep DISTRIB_ID /etc/lsb-release | cut -d "=" -f 2 | tr '[A-Z]' '[a-z]'` platform_version=`grep DISTRIB_RELEASE /etc/lsb-release | cut -d "=" -f 2` fi +if test "x$os" = "xFreeBSD"; then + platform="freebsd" + platform_version=`uname -r | sed 's/-.*//'` +fi + compile_rubygems() { cd /tmp wget http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz -O - | tar zxf - @@ -20,6 +28,7 @@ compile_rubygems() { cd - } + case $platform in "ubuntu") export DEBIAN_FRONTEND=noninteractive @@ -47,8 +56,17 @@ case $platform in apt-get -q -y install git cmake build-essential fi ;; + freebsd) + if pkg -N 2>&1 | grep "pkg is not installed"; then + export ASSUME_ALWAYS_YES=YES + pkg bootstrap + pkg2ng + fi + pkg install -y ruby + pkg install -y ruby19-gems + ;; *) - echo "i don't know how to setup base o/s on this platform, hope it works!" + echo "i don't know how to setup base o/s on platform $platform, hope it works!" ;; esac |