From d9f424c9e2e8c3ccaf1149738f4f48d5b8c05b44 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 3 Mar 2018 11:10:44 +0000 Subject: [PATCH] Check for presence of golang directory --- src/freedombone-utils-go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/freedombone-utils-go b/src/freedombone-utils-go index 8e032764..a6cb8532 100755 --- a/src/freedombone-utils-go +++ b/src/freedombone-utils-go @@ -209,7 +209,12 @@ function mesh_upgrade_golang { echo "export PATH=\$PATH:\$GOPATH" >> "${rootdir}/home/go/.bashrc" $prefix chown -R "$MY_USERNAME":"$MY_USERNAME" "/home/$MY_USERNAME" $prefix chown -R go:go /home/go - cp "${rootdir}/home/go/go${GO_VERSION}/bin/*" "${rootdir}/usr/bin" + if [ ! -d "${rootdir}/home/go/go${GO_VERSION}/bin" ]; then + echo $"golang binaries directory not found ${rootdir}/home/go/go${GO_VERSION}/bin" + exit 356356785 + fi + # shellcheck disable=SC2086 + cp ${rootdir}/home/go/go${GO_VERSION}/bin/* "${rootdir}/usr/bin" } function upgrade_golang {