Skip to content

Instantly share code, notes, and snippets.

@0x003e
Forked from jacoelho/golang.sh
Last active October 1, 2016 20:16
Show Gist options
  • Select an option

  • Save 0x003e/f543ae91e097a2368a2122e0d076e319 to your computer and use it in GitHub Desktop.

Select an option

Save 0x003e/f543ae91e097a2368a2122e0d076e319 to your computer and use it in GitHub Desktop.

Revisions

  1. 0x003e revised this gist Oct 1, 2016. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions golang.sh
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,6 @@

    export GOLANG_VERSION=1.7.1
    export GOLANG_DOWNLOAD_URL=https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
    export GOLANG_DOWNLOAD_SHA256=2b843f133b81b7995f26d0cb64bbdbb9d0704b90c44df45f844d28881ad442d3

    apt-get update -qq

    @@ -14,7 +13,6 @@ apt-get install -y --no-install-recommends \
    git-core

    curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
    && echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \
    && tar -C /usr/local -xzf golang.tar.gz \
    && rm golang.tar.gz

  2. 0x003e revised this gist Oct 1, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion golang.sh
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    export GOLANG_VERSION=1.7.1
    export GOLANG_DOWNLOAD_URL=https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
    export GOLANG_DOWNLOAD_SHA256=cdde5e08530c0579255d6153b08fdb3b8e47caabbe717bc7bcd7561275a87aeb
    export GOLANG_DOWNLOAD_SHA256=2b843f133b81b7995f26d0cb64bbdbb9d0704b90c44df45f844d28881ad442d3

    apt-get update -qq

  3. 0x003e revised this gist Oct 1, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion golang.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    #!/bin/bash

    export GOLANG_VERSION=1.6.3
    export GOLANG_VERSION=1.7.1
    export GOLANG_DOWNLOAD_URL=https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
    export GOLANG_DOWNLOAD_SHA256=cdde5e08530c0579255d6153b08fdb3b8e47caabbe717bc7bcd7561275a87aeb

  4. @jacoelho jacoelho revised this gist Aug 1, 2016. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions golang.sh
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,8 @@
    #!/bin/bash

    export GOLANG_VERSION=1.5.2
    export GOLANG_VERSION=1.6.3
    export GOLANG_DOWNLOAD_URL=https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
    export GOLANG_DOWNLOAD_SHA1=cae87ed095e8d94a81871281d35da7829bd1234e
    export GOLANG_DOWNLOAD_SHA256=cdde5e08530c0579255d6153b08fdb3b8e47caabbe717bc7bcd7561275a87aeb

    apt-get update -qq

    @@ -14,7 +14,7 @@ apt-get install -y --no-install-recommends \
    git-core

    curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
    && echo "$GOLANG_DOWNLOAD_SHA1 golang.tar.gz" | sha1sum -c - \
    && echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \
    && tar -C /usr/local -xzf golang.tar.gz \
    && rm golang.tar.gz

  5. @jacoelho jacoelho revised this gist Dec 3, 2015. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions golang.sh
    Original file line number Diff line number Diff line change
    @@ -19,6 +19,7 @@ curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
    && rm golang.tar.gz

    for bin in $(ls /usr/local/go/bin/); do
    test -f /usr/bin/$bin && rm /usr/bin/$bin
    update-alternatives --install /usr/bin/$bin $bin /usr/local/go/bin/$bin 1
    update-alternatives --set $bin /usr/local/go/bin/$bin
    done
  6. @jacoelho jacoelho revised this gist Dec 3, 2015. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions golang.sh
    Original file line number Diff line number Diff line change
    @@ -20,4 +20,5 @@ curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \

    for bin in $(ls /usr/local/go/bin/); do
    update-alternatives --install /usr/bin/$bin $bin /usr/local/go/bin/$bin 1
    update-alternatives --set $bin /usr/local/go/bin/$bin
    done
  7. @jacoelho jacoelho revised this gist Dec 3, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions golang.sh
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,8 @@
    #!/bin/bash

    export GOLANG_VERSION=1.5.1
    export GOLANG_VERSION=1.5.2
    export GOLANG_DOWNLOAD_URL=https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
    export GOLANG_DOWNLOAD_SHA1=46eecd290d8803887dec718c691cc243f2175fe0
    export GOLANG_DOWNLOAD_SHA1=cae87ed095e8d94a81871281d35da7829bd1234e

    apt-get update -qq

  8. @jacoelho jacoelho revised this gist Sep 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion golang.sh
    Original file line number Diff line number Diff line change
    @@ -18,6 +18,6 @@ curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
    && tar -C /usr/local -xzf golang.tar.gz \
    && rm golang.tar.gz

    for bin in go godoc gofmt; do
    for bin in $(ls /usr/local/go/bin/); do
    update-alternatives --install /usr/bin/$bin $bin /usr/local/go/bin/$bin 1
    done
  9. @jacoelho jacoelho created this gist Sep 22, 2015.
    23 changes: 23 additions & 0 deletions golang.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    #!/bin/bash

    export GOLANG_VERSION=1.5.1
    export GOLANG_DOWNLOAD_URL=https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
    export GOLANG_DOWNLOAD_SHA1=46eecd290d8803887dec718c691cc243f2175fe0

    apt-get update -qq

    apt-get install -y --no-install-recommends \
    g++ \
    gcc \
    libc6-dev \
    make \
    git-core

    curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
    && echo "$GOLANG_DOWNLOAD_SHA1 golang.tar.gz" | sha1sum -c - \
    && tar -C /usr/local -xzf golang.tar.gz \
    && rm golang.tar.gz

    for bin in go godoc gofmt; do
    update-alternatives --install /usr/bin/$bin $bin /usr/local/go/bin/$bin 1
    done