From 84ec23ba2798ea2ee5abce0ed381ef48afdc5151 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Thu, 1 Jun 2017 21:51:13 +0200 Subject: [PATCH] Added install script for dependencies --- contribute/.gitignore | 2 ++ contribute/install.sh | 47 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 contribute/.gitignore create mode 100755 contribute/install.sh diff --git a/contribute/.gitignore b/contribute/.gitignore new file mode 100644 index 00000000..da84c421 --- /dev/null +++ b/contribute/.gitignore @@ -0,0 +1,2 @@ +* +!install.sh diff --git a/contribute/install.sh b/contribute/install.sh new file mode 100755 index 00000000..ac8c3517 --- /dev/null +++ b/contribute/install.sh @@ -0,0 +1,47 @@ +#!/bin/sh + +UBUNTU_VERSION="16.04" +GO_VERSION="1.8.3" +AS_VERSION="3.13.0.1" + +GO_FILE="go$GO_VERSION.linux-amd64.tar.gz" +AS_FILE="aerospike-server-community-$AS_VERSION-ubuntu$UBUNTU_VERSION.tgz" +AS_DIR="aerospike-server-community-$AS_VERSION-ubuntu$UBUNTU_VERSION" + +if [ ! -d /usr/local/go ]; then + if [ ! -f "./$GO_FILE" ]; then + echo "Downloading Go..." + wget https://storage.googleapis.com/golang/$GOFILE + fi + + echo "Extracting Go..." + sudo tar -C /usr/local -xzf $GO_FILE + + export PATH=$PATH:/usr/local/go/bin + echo "Don't forget to add the following to your terminal startup scripts:" + echo "export PATH=\$PATH:/usr/local/go/bin" +fi + +if [ ! -f /usr/bin/asd ]; then + if [ ! -f ./$AS_FILE ]; then + echo "Downloading Aerospike..." + wget http://artifacts.aerospike.com/aerospike-server-community/$AS_VERSION/$AS_FILE + fi + + if [ ! -d ./$AS_DIR ]; then + echo "Extracting Aerospike..." + tar xzf $AS_FILE + fi + + echo "Installing Aerospike..." + cd $AS_DIR + sudo ./asinstall + cd .. +fi + +# if [ ! -d ./notify.moe ]; then +# echo "Downloading notify.moe source..." +# git clone git@github.com:animenotifier/notify.moe.git +# fi + +echo "Finished installing notify.moe dependencies."