From ed3a68c37560996740f4b37b6b8d82b7b789c1cd Mon Sep 17 00:00:00 2001 From: parazyd Date: Mon, 15 Jan 2018 20:00:57 +0100 Subject: [PATCH] Install go binaries in $PATH --- config | 1 + decode.blend | 5 ++++- rootfs-overlay/common/etc/profile | 31 ------------------------------- 3 files changed, 5 insertions(+), 32 deletions(-) delete mode 100644 rootfs-overlay/common/etc/profile diff --git a/config b/config index a13ea6b..10d57e6 100755 --- a/config +++ b/config @@ -7,6 +7,7 @@ image_name="${blend_name}-${blend_vers}-${arch}" golang_version="1.9.2" golang_arch="amd64" +[[ -n "$armsdk_version" ]] && golang_arch="armv6l" golang_url="https://storage.googleapis.com/golang/go${golang_version}.linux-${golang_arch}.tar.gz" tomb_version="v2.4" diff --git a/decode.blend b/decode.blend index cc3f1a4..6e41538 100644 --- a/decode.blend +++ b/decode.blend @@ -1,5 +1,5 @@ #!/usr/bin/env zsh -# Copyright (c) 2017 Dyne.org Foundation +# Copyright (c) 2017-2018 Dyne.org Foundation # # decode.blend is written and maintained by Ivan J. # @@ -120,6 +120,9 @@ blend_install_golang() { cd /usr/local tar xvf go.tgz rm -f go.tgz + +ln -snvf /usr/local/go/bin/go /usr/local/bin/go +ln -snvf /usr/local/go/bin/gofmt /usr/local/bin/gofmt EOF chroot-script install-golang || zerr } diff --git a/rootfs-overlay/common/etc/profile b/rootfs-overlay/common/etc/profile deleted file mode 100644 index 9e6152d..0000000 --- a/rootfs-overlay/common/etc/profile +++ /dev/null @@ -1,31 +0,0 @@ -# /etc/profile: system-wide .profile file for the Bourne shell (sh(1)) -# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...). - -PATH="/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" -export PATH - -if [ "$PS1" ]; then - if [ "$BASH" ] && [ "$BASH" != "/bin/sh" ]; then - # The file bash.bashrc already sets the default PS1. - # PS1='\h:\w\$ ' - if [ -f /etc/bash.bashrc ]; then - . /etc/bash.bashrc - fi - else - if [ "`id -u`" -eq 0 ]; then - PS1='# ' - else - PS1='$ ' - fi - fi -fi - -if [ -d /etc/profile.d ]; then - for i in /etc/profile.d/*.sh; do - if [ -r $i ]; then - . $i - fi - done - unset i -fi -