Move elixir to its own file

This commit is contained in:
Bob Mottram 2018-03-12 09:51:30 +00:00
parent d07bcac281
commit b9f01c1985
2 changed files with 64 additions and 25 deletions

View File

@ -902,7 +902,7 @@ function remove_pleroma {
rm /etc/systemd/system/pleroma.service rm /etc/systemd/system/pleroma.service
userdel pleroma userdel pleroma
#apt-get -yq remove esl-erlang elixir erlang-xmerl erlang-dev erlang-parsetools #remove_elixir
function_check remove_nodejs function_check remove_nodejs
remove_nodejs pleroma-backend remove_nodejs pleroma-backend
@ -936,30 +936,6 @@ function remove_pleroma {
remove_ddns_domain "$PLEROMA_DOMAIN_NAME" remove_ddns_domain "$PLEROMA_DOMAIN_NAME"
} }
function install_elixir {
apt-get -yq install wget build-essential
if [ ! -d "$INSTALL_DIR" ]; then
mkdir -p "$INSTALL_DIR"
fi
cd "$INSTALL_DIR" || exit 768345274
erlang_package=erlang-solutions_1.0_all.deb
wget https://packages.erlang-solutions.com/$erlang_package
if [ ! -f "$INSTALL_DIR/$erlang_package" ]; then
exit 72853
fi
dpkg -i $erlang_package
apt-get -yq update
apt-get -yq install esl-erlang
apt-get -yq install elixir erlang-xmerl erlang-dev erlang-parsetools
if [ ! -f /usr/local/bin/mix ]; then
echo $'/usr/local/bin/mix not found after elixir installation'
exit 629352
fi
}
function install_pleroma { function install_pleroma {
if [ ! $ONION_ONLY ]; then if [ ! $ONION_ONLY ]; then
ONION_ONLY='no' ONION_ONLY='no'

63
src/freedombone-utils-elixir Executable file
View File

@ -0,0 +1,63 @@
#!/bin/bash
#
# .---. . .
# | | |
# |--- .--. .-. .-. .-.| .-. .--.--. |.-. .-. .--. .-.
# | | (.-' (.-' ( | ( )| | | | )( )| | (.-'
# ' ' --' --' -' - -' ' ' -' -' -' ' - --'
#
# Freedom in the Cloud
#
# Elixir functions
#
# There's a problem with installing this onto mesh images, which is
# that qemu appears to run out of RAM when using yarn to add webpack.
#
# License
# =======
#
# Copyright (C) 2018 Bob Mottram <bob@freedombone.net>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
function remove_elixir {
apt-get -yq remove elixir erlang-xmerl erlang-dev erlang-parsetools
apt-get -yq remove esl-erlang
}
function install_elixir {
apt-get -yq install wget build-essential
if [ ! -d "$INSTALL_DIR" ]; then
mkdir -p "$INSTALL_DIR"
fi
cd "$INSTALL_DIR" || exit 768345274
erlang_package=erlang-solutions_1.0_all.deb
wget https://packages.erlang-solutions.com/$erlang_package
if [ ! -f "$INSTALL_DIR/$erlang_package" ]; then
exit 72853
fi
dpkg -i $erlang_package
apt-get -yq update
apt-get -yq install esl-erlang
apt-get -yq install elixir erlang-xmerl erlang-dev erlang-parsetools
if [ ! -f /usr/local/bin/mix ]; then
echo $'/usr/local/bin/mix not found after elixir installation'
exit 629352
fi
}
# NOTE: deliberately no exit 0