File: bootstrap

package info (click to toggle)
ruby-will-paginate 3.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 444 kB
  • sloc: ruby: 2,940; sh: 50; makefile: 2
file content (22 lines) | stat: -rwxr-xr-x 694 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
# vi:ft=sh:
set -e

if type -p brew >/dev/null; then
  brew bundle --no-upgrade
  mysql_prefix="$(brew --prefix mysql@5.7)"
  openssl_prefix="$(brew --prefix openssl@1.1)"
  bundle config set --local build.mysql2 --with-mysql-config="${mysql_prefix}/bin/mysql_config" --with-ldflags="-L${openssl_prefix}/lib"

  while [ ! -e /tmp/mysql.sock ] && [ ! -e /var/run/mysql5/mysqld.sock ]; do
    echo "Waiting for mysql to start up ..." >&2
    sleep 1
  done
fi

mysql -u root -e 'CREATE DATABASE IF NOT EXISTS will_paginate;'
psql --dbname will_paginate -c '' 2>/dev/null || createdb will_paginate

bundle config set path "$PWD/vendor/bundle"
bundle install
bundle binstubs rspec-core