asciinema.org/script/setup

32 lines
637 B
Plaintext
Raw Normal View History

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