mirror of
https://github.com/zulip/zulip.git
synced 2025-11-12 09:58:06 +00:00
/bin/sh and /usr/bin/env are the only two binaries that NixOS provides at a fixed path (outside a buildFHSUserEnv sandbox). This discussion was split from #11004. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
29 lines
917 B
Bash
Executable File
29 lines
917 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -x
|
|
set -e
|
|
|
|
is_centos=false
|
|
if [ -e /etc/centos-release ]; then
|
|
is_centos=true
|
|
yum install -y epel-release
|
|
fi
|
|
yum update -y
|
|
|
|
# "Development Tools" is the equivalent of build-essential
|
|
yum groupinstall -y "Development Tools"
|
|
|
|
RHVER="$(rpm -qf --queryformat="%{VERSION}" /etc/redhat-release)"
|
|
RHARCH="$(rpm -qf --queryformat="%{ARCH}" /etc/redhat-release)"
|
|
PGVER=10
|
|
if [ "$is_centos" = true ]; then
|
|
# PostgreSQL $PGVER
|
|
yum localinstall -y "https://yum.postgresql.org/$PGVER/redhat/rhel-$RHVER-$RHARCH/pgdg-centos$PGVER-$PGVER-2.noarch.rpm"
|
|
|
|
# PGroonga
|
|
# https://pgroonga.github.io/install/centos.html
|
|
yum localinstall -y https://packages.groonga.org/centos/groonga-release-latest.noarch.rpm
|
|
else
|
|
# TODO only fedora29 for now
|
|
dnf install -y "https://download.postgresql.org/pub/repos/yum/$PGVER/fedora/fedora-29-x86_64/pgdg-fedora$PGVER-$PGVER-4.noarch.rpm"
|
|
fi
|