Make install script works on archlinux

This commit is contained in:
Pierre-Emmanuel Wulfman 2019-10-24 13:04:16 +00:00 committed by Tom Jack
parent 7958508e14
commit f68e91466e
3 changed files with 84 additions and 41 deletions

View File

@ -18,20 +18,43 @@ then
fi fi
fi fi
echo "Installing dependencies.."
if [ -n "`uname -a | grep -i arch`" ]
then
sudo pacman -Sy --noconfirm \
make \
m4 \
gcc \
patch \
bubblewrap \
rsync \
curl
fi
if [ -n "`uname -a | grep -i ubuntu`" ]
then
sudo apt-get install -y make \ sudo apt-get install -y make \
m4 \ m4 \
gcc \ gcc \
patch \ patch \
bubblewrap \ bubblewrap \
rsync \ rsync \
curl \ curl
fi
if [ -n "`uname -a | grep -i ubuntu`" ] if [ -n "`uname -a | grep -i ubuntu`" ]
then then
echo "ubuntu"
sudo add-apt-repository -y ppa:avsm/ppa sudo add-apt-repository -y ppa:avsm/ppa
sudo apt-get update sudo apt-get update
sudo apt-get install opam sudo apt-get install opam
else else
if [ -n "`uname -a | grep -i arch`" ]
then
echo "arch"
sudo pacman -Sy --noconfirm opam
else
echo "unknown distro"
#I'm going to assume here that we're on x86_64, 32-bit users should be basically #I'm going to assume here that we're on x86_64, 32-bit users should be basically
#extinct at this point right? #extinct at this point right?
curl -L https://github.com/ocaml/opam/releases/download/2.0.4/opam-2.0.4-x86_64-linux \ curl -L https://github.com/ocaml/opam/releases/download/2.0.4/opam-2.0.4-x86_64-linux \
@ -63,5 +86,8 @@ else
exit 1 exit 1
fi fi
fi fi
fi
opam init -a --bare opam init -a --bare

View File

@ -1,6 +1,22 @@
#!/bin/sh #!/bin/sh
set -e set -e
. /etc/os-release
if [ $ID = arch ]
then
pacman -Sy
sudo pacman -S --noconfirm \
libevdev \
perl \
pkg-config \
gmp \
hidapi \
m4 \
libcap \
bubblewrap \
rsync
else
apt-get update -qq apt-get update -qq
apt-get -y -qq install \ apt-get -y -qq install \
libev-dev \ libev-dev \
@ -12,3 +28,4 @@ apt-get -y -qq install \
libcap-dev \ libcap-dev \
bubblewrap \ bubblewrap \
rsync rsync
fi

View File

@ -2,5 +2,5 @@
set -e set -e
set -x set -x
printf '' | opam switch create . 4.07.1 # toto ocaml-base-compiler.4.06.1 printf '' | opam switch create . ocaml-base-compiler.4.07.1 # toto ocaml-base-compiler.4.06.1
eval $(opam config env) eval $(opam config env)