Skip to content

Commit

Permalink
Add special case for Fedora, eliminate graphql from common prereqs
Browse files Browse the repository at this point in the history
  • Loading branch information
rdlrt committed Sep 14, 2020
1 parent 9f3cd72 commit 1e009b1
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions scripts/cnode-helper-scripts/prereqs.sh
Expand Up @@ -117,30 +117,25 @@ if [ "$WANT_BUILD_DEPS" = 'Y' ]; then
echo "Using apt to prepare packages for ${DISTRO} system"
echo " Updating system packages..."
$sudo apt-get -y install curl > /dev/null
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | $sudo apt-key add - > /dev/null
echo "deb https://dl.yarnpkg.com/debian/ stable main" | $sudo tee /etc/apt/sources.list.d/yarn.list > /dev/null
$sudo apt-get -y update > /dev/null
echo " Installing missing prerequisite packages, if any.."
pkg_list="libpq-dev python3 build-essential pkg-config libffi-dev libgmp-dev libssl-dev libtinfo-dev systemd libsystemd-dev libsodium-dev zlib1g-dev yarn make g++ tmux git jq wget libncursesw5 gnupg aptitude libtool autoconf secure-delete iproute2 bc tcptraceroute"
pkg_list="libpq-dev python3 build-essential pkg-config libffi-dev libgmp-dev libssl-dev libtinfo-dev systemd libsystemd-dev libsodium-dev zlib1g-dev make g++ tmux git jq wget libncursesw5 gnupg aptitude libtool autoconf secure-delete iproute2 bc tcptraceroute"
$sudo apt-get -y install ${pkg_list} > /dev/null;rc=$?
if [ $rc != 0 ]; then
echo "An error occurred while installing the prerequisite packages, please investigate by using the command below:"
echo "sudo apt-get -y install ${pkg_list}"
echo "It would be best if you could submit an issue at https://github.com/cardano-community/guild-operators with the details to tackle in future, as some errors may be due to external/already present dependencies"
exit;
else
$sudo aptitude install npm -yq > /dev/null
fi
elif [ -z "${OS_ID##*rhel*}" ]; then
elif [ -z "${OS_ID##*rhel*}" ] || [[ "${DISTRO}" == *Fedora* ]]; then
#CentOS/RHEL/Fedora
echo "Using yum to prepare packages for ${DISTRO} system"
echo " Updating system packages..."
$sudo yum -y install curl > /dev/null
curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | $sudo tee /etc/yum.repos.d/yarn.repo > /dev/null
$sudo rpm --import https://dl.yarnpkg.com/rpm/pubkey.gpg > /dev/null
$sudo yum -y update > /dev/null
echo " Installing missing prerequisite packages, if any.."
pkg_list="python3 coreutils pkgconfig libffi-devel gmp-devel openssl-devel ncurses-libs ncurses-compat-libs systemd systemd-devel libsodium-devel zlib-devel npm yarn make gcc-c++ tmux git wget epel-release jq gnupg libtool autoconf srm iproute bc tcptraceroute"
pkg_list="python3 coreutils pkgconfig libffi-devel gmp-devel openssl-devel ncurses-libs ncurses-compat-libs systemd systemd-devel libsodium-devel zlib-devel make gcc-c++ tmux git wget jq gnupg libtool autoconf srm iproute bc tcptraceroute"
[[ ! "${DISTRO}" == *Fedora* ]] && pkg_list="epel-release $pkg_list"
$sudo yum -y install ${pkg_list} > /dev/null;rc=$?
if [ $rc != 0 ]; then
echo "An error occurred while installing the prerequisite packages, please investigate by using the command below:"
Expand Down

0 comments on commit 1e009b1

Please sign in to comment.