2019-05-24 01:06:15 +04:00
|
|
|
#!/bin/bash
|
|
|
|
# You can run this installer like this:
|
2019-05-27 20:04:26 +04:00
|
|
|
# curl https://gitlab.com/ligolang/ligo/blob/master/scripts/installer.sh | bash
|
2019-05-27 14:06:56 +04:00
|
|
|
# Make sure the marigold/ligo image is published at docker hub first
|
|
|
|
set -euET -o pipefail
|
2019-06-06 18:49:47 +04:00
|
|
|
version=$1
|
|
|
|
printf "\nInstalling LIGO ($version)\n\n"
|
2019-05-24 01:06:15 +04:00
|
|
|
|
|
|
|
# Install the ligo.sh from master
|
2019-06-06 18:49:47 +04:00
|
|
|
wget https://gitlab.com/ligolang/ligo/raw/master/scripts/ligo.sh
|
|
|
|
|
|
|
|
|
|
|
|
# Overwrite LIGO version in the executable
|
|
|
|
sed -i '' "s/latest/$version/g" ligo.sh
|
2019-05-24 01:06:15 +04:00
|
|
|
|
|
|
|
# Copy the exucutable to the appropriate directory
|
|
|
|
sudo cp ligo.sh /usr/local/bin/ligo
|
|
|
|
sudo chmod +x /usr/local/bin/ligo
|
|
|
|
rm ligo.sh
|
|
|
|
|
2019-05-27 20:10:25 +04:00
|
|
|
# Pull the docker image used by ligo.sh
|
2019-06-06 18:49:47 +04:00
|
|
|
docker pull "ligolang/ligo:$version"
|
2019-05-27 20:10:25 +04:00
|
|
|
|
2019-05-24 01:06:15 +04:00
|
|
|
# Installation finished, try running 'ligo' from your CLI
|
2019-06-06 18:49:47 +04:00
|
|
|
printf "\nInstallation successful, try to run 'ligo --help' now.\n"
|