This repository has been archived on 2021-04-24. You can view files and clone it, but cannot push or open issues or pull requests.
Mikubot-2/install-dependencies.sh

34 lines
1.2 KiB
Bash
Raw Normal View History

# This script will attempt to install Lua 5.3, Luarocks (pointed at 5.3), and
# the rocks necssary to run otouto. This script targets Ubuntu 16.04; it will
2016-09-04 09:42:51 +02:00
# probably not work on earlier versions of Ubuntu.
#!/bin/sh
2016-09-04 09:42:51 +02:00
2016-09-04 20:49:43 +02:00
echo "This script is intended for Ubuntu 16.04 and later. It will not work in"
echo "14.04 or earlier."
2016-09-04 09:42:51 +02:00
echo "This script will request root privileges to install the following packages:"
2016-09-04 20:49:43 +02:00
echo "lua5.3 liblua5.3-dev git libssl-dev fortune-mod fortunes unzip"
echo "It will also request root privileges to install Luarocks to to /usr/local/"
echo "along with the following rocks:"
2016-09-04 09:42:51 +02:00
echo "luasocket luasec multipart-post lpeg dkjson"
echo "Press enter to continue. Use Ctrl-C to exit."
read
sudo apt-get update
2016-09-04 20:49:43 +02:00
sudo apt-get install -y lua5.3 liblua5.3-dev git libssl-dev fortune-mod fortunes unzip
git clone http://github.com/keplerproject/luarocks
cd luarocks
./configure --lua-version=5.3 --versioned-rocks-dir --lua-suffix=5.3
make build
sudo make install
sudo luarocks-5.3 install luasocket
sudo luarocks-5.3 install luasec
sudo luarocks-5.3 install multipart-post
sudo luarocks-5.3 install lpeg
sudo luarocks-5.3 install dkjson
2016-09-04 20:49:43 +02:00
sudo -k
cd ..
2016-09-04 09:42:51 +02:00
echo "Finished. Use ./launch to start otouto."
echo "Be sure to set your bot token in config.lua."