Last active
August 29, 2015 14:11
-
-
Save mietek/5a213e2023d1c7f6bdf9 to your computer and use it in GitHub Desktop.
Cross-platform OS setup for Halcyon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
curl -sL 'https://github.com/mietek/bashmenot/raw/master/src/platform.sh' -o '/tmp/platform.sh' | |
source '/tmp/platform.sh' | |
platform=$( detect_platform ) | |
case "${platform}" in | |
'linux-centos-6'*) | |
yum groupinstall -y 'Development Tools' | |
yum install -y git zlib-devel yum-plugin-downloadonly | |
echo 'source .profile' >>"${HOME}/.bash_profile" | |
;; | |
'linux-centos-7'*) | |
yum groupinstall -y 'Development Tools' | |
yum install -y git zlib-devel | |
echo 'source .profile' >>"${HOME}/.bash_profile" | |
;; | |
'linux-debian-6'*) | |
apt-get update | |
apt-get install -y build-essential git libgmp3c2 pigz zlib1g-dev | |
echo 'export BASHMENOT_CURL_RETRIES=0' >>"${HOME}/.profile" | |
;; | |
'linux-debian-7'*|'linux-ubuntu-14'*) | |
apt-get update | |
apt-get install -y build-essential git pigz zlib1g-dev | |
;; | |
'linux-fedora-19'*) | |
yum groupinstall -y 'Development Tools' | |
yum install -y git pigz zlib-devel | |
echo 'source .profile' >>"${HOME}/.bash_profile" | |
;; | |
'linux-fedora-20'*|'linux-fedora-21'*) | |
yum groupinstall -y 'Development Tools' | |
yum install -y git patch pigz tar zlib-devel | |
systemctl disable firewalld | |
systemctl stop firewalld | |
echo 'source .profile' >>"${HOME}/.bash_profile" | |
;; | |
'linux-ubuntu-10'*) | |
apt-get update | |
apt-get install -y build-essential git-core libgmp3c2 pigz zlib1g-dev | |
apt-get install -y --reinstall ca-certificates | |
;; | |
'linux-ubuntu-12'*) | |
apt-get update | |
apt-get install -y build-essential git libgmp3c2 pigz zlib1g-dev | |
;; | |
'linux-arch'*) | |
pacman --sync --noconfirm base-devel git pigz zlib | |
;; | |
*) | |
echo " *** ERROR: Unexpected platform: ${platform}" >&2 | |
exit 1 | |
esac | |
cat >>"${HOME}/.profile" <<EOF | |
[[ -d halcyon ]] || git clone https://github.com/mietek/halcyon | |
source <( HALCYON_NO_SELF_UPDATE=1 halcyon/halcyon paths ) | |
EOF | |
source "${HOME}/.profile" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment