Skip to content

Commit

Permalink
Merge pull request #299 from s41m0n/support/UbuntuFocalFossa
Browse files Browse the repository at this point in the history
Modified golang-go dependency to support Ubuntu 20.04
  • Loading branch information
goldenrye committed May 12, 2020
2 parents 2e4f4e2 + 5ab65b1 commit 16bcb4e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
7 changes: 7 additions & 0 deletions Documentation/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ Install GO

Go 1.8+ is needed to run ``polycubectl``, if you only plan to install ``polycubed`` you can skip this step.

Since Ubuntu 20.04, support for ``golang-go`` has been introduced into the main repositories. Thus, you just need to run

::
sudo apt install golang-go

Instead, for all the previous versions (< 20.04) please refer to the following instructions:

::

# If you are running a previous Ubuntu version, you could add the
Expand Down
10 changes: 8 additions & 2 deletions scripts/pre-requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@ mkdir -p $WORKDIR
$SUDO apt update
$SUDO bash -c "apt install --allow-unauthenticated -y wget gnupg2 software-properties-common"

# golang v1.12 still not available in repos
$SUDO add-apt-repository ppa:longsleep/golang-backports -y || true
os_limit="20.04"
os_version=`cat /etc/os-release | grep -Po 'VERSION_ID="\K.*?(?=")'`

# golang v1.12 still not available in repos for Ubuntu versions < 20.04
if (( $(echo "$os_version < $os_limit" | bc -l) ))
then
$SUDO add-apt-repository ppa:longsleep/golang-backports -y || true
fi

$SUDO apt update
PACKAGES=""
Expand Down

0 comments on commit 16bcb4e

Please sign in to comment.