2014-06-22 09:42:26 +00:00
|
|
|
#!/bin/bash
|
2012-05-05 23:53:50 +00:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2015-07-18 11:47:48 +00:00
|
|
|
if sudo apt-get install -y autoconf libtool pkg-config; then
|
|
|
|
if [ ! -e /usr/local/lib/libtsm.a ]; then
|
|
|
|
echo "libtsm missing, compiling from source..."
|
|
|
|
DIR=$(mktemp -d -t tsmXXXXXX)
|
|
|
|
cd $DIR
|
|
|
|
git clone git://people.freedesktop.org/~dvdhrm/libtsm .
|
|
|
|
git checkout libtsm-3
|
|
|
|
test -f ./configure || NOCONFIGURE=1 ./autogen.sh
|
|
|
|
./configure --prefix=/usr/local
|
|
|
|
make
|
|
|
|
sudo make install
|
|
|
|
sudo ldconfig
|
|
|
|
cd -
|
|
|
|
fi
|
2014-06-22 09:42:26 +00:00
|
|
|
|
2015-07-18 11:47:48 +00:00
|
|
|
if [ -e /usr/local/lib/libtsm.a ]; then
|
|
|
|
cd src && make && cd -
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "warning: sudo failed, not compiling libtsm and terminal binary"
|
2013-08-25 15:03:13 +00:00
|
|
|
fi
|
|
|
|
|
2014-06-22 09:42:26 +00:00
|
|
|
if [ ! -e config/database.yml ]; then
|
|
|
|
cp config/database.yml.example config/database.yml
|
|
|
|
fi
|
|
|
|
|
2012-05-05 23:53:50 +00:00
|
|
|
rm -f log/*
|
2012-10-12 20:03:48 +00:00
|
|
|
bundle install
|
2013-08-25 15:03:13 +00:00
|
|
|
bundle exec rake db:setup
|
2013-08-25 15:15:00 +00:00
|
|
|
mkdir -p tmp
|
2012-05-05 23:53:50 +00:00
|
|
|
touch tmp/restart.txt
|