qira/install.sh

43 lines
1.2 KiB
Bash
Raw Normal View History

2014-07-28 14:55:25 -07:00
#!/bin/bash -e
2014-07-02 18:19:26 -07:00
# default is just pip, but on things like arch where python 3 is default, it's pip2
PIP="pip"
2014-07-14 16:56:30 -07:00
2014-07-14 15:50:10 -07:00
# we need pip to install python stuff
# build for building qiradb and stuff for flask like gevent
2014-07-14 16:56:30 -07:00
if [ $(which apt-get) ]; then
2014-07-21 14:19:33 -07:00
echo "installing apt packages"
2014-07-22 11:19:04 -07:00
sudo apt-get install build-essential python-dev python-pip debootstrap
2014-07-28 14:08:10 -07:00
elif [ $(which pacman) ]; then
echo "installing pip"
sudo pacman -S base-devel python2-pip
PIP="pip2"
2014-07-31 16:04:42 -07:00
elif [ $(which yum) ]; then
sudo yum install python-pip python-devel gcc gcc-c++
2014-07-02 18:19:26 -07:00
fi
2014-07-31 11:56:44 -07:00
if [ $(qemu/qira-i386 > /dev/null; echo $?) == 1 ]; then
2014-07-31 11:47:11 -07:00
echo "QIRA QEMU appears to run okay"
else
echo "building QEMU"
./qemu_build.sh
fi
2014-07-30 16:02:23 -07:00
2014-07-14 16:56:30 -07:00
echo "installing pip packages"
2014-08-03 03:30:55 +00:00
# we install more than we strictly need here, because pip is so easy
sudo $PIP install --upgrade html flask-socketio pillow pyelftools socketIO-client pydot ipaddr ./qiradb
2014-07-02 18:19:26 -07:00
2014-07-28 14:55:25 -07:00
echo "making symlink"
sudo ln -sf $(pwd)/qira /usr/local/bin/qira
2014-07-31 12:27:16 -07:00
if [ -f web/qira.html ]; then
echo "trunk detected"
if [ ! -d ~/.meteor ]; then
echo "installing meteor"
sudo apt-get install curl
curl https://install.meteor.com | /bin/sh
~/.meteor/tools/latest/bin/npm install -g meteorite
fi
fi