From 656dd985e2be696b3fef9d1aa74cca54b2d6385f Mon Sep 17 00:00:00 2001
From: Massimiliano Adamo <massimiliano.adamo@geant.org>
Date: Sun, 11 Apr 2021 16:54:45 +0200
Subject: [PATCH] remove unused script

---
 build-binary-for-linux-64.sh | 54 ------------------------------------
 build.sh                     |  5 ++--
 2 files changed, 2 insertions(+), 57 deletions(-)
 delete mode 100755 build-binary-for-linux-64.sh

diff --git a/build-binary-for-linux-64.sh b/build-binary-for-linux-64.sh
deleted file mode 100755
index 5dae182..0000000
--- a/build-binary-for-linux-64.sh
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/bash
-#
-# for windows and Mac check the README
-#
-BIN_NAME=acme-downloader
-PATH=$PATH:$(go env GOPATH)/bin
-GOPATH=$(go env GOPATH)
-PROG_VERSION="1.0"
-BUILDTIME=$(date -u '+%Y-%m-%d_%H:%M:%S')
-export BIN_NAME PATH GOPATH PROG_VERSION BUILDTIME
-
-REPO_DIR=$(dirname $0)
-if [ "$REPO_DIR" = '.' ]; then
-    REPO_DIR=$(pwd)
-fi
-ln -sf "$REPO_DIR" "${GOPATH}/src/"
-REPO_NAME=$(basename "$REPO_DIR")
-cd "${GOPATH}/src/$REPO_NAME"
-
-#LATEST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
-#PROG_VERSION=$(echo $LATEST_TAG | sed -e 's/^v//')
-
-run_upx() {
-    if ! which upx &>/dev/null; then
-        echo "please download upx here https://github.com/upx/upx/releases"
-        echo "and store the executable within your \$PATH"
-        exit
-    fi
-    upx --brute ${GOPATH}/bin/${BIN_NAME}
-}
-
-go get -ldflags "-s -w -X main.appVersion=${PROG_VERSION} -X main.buildTime=${BUILDTIME}" .
-if [ $? -gt 0 ]; then
-    echo -e "\nthere was an error while compiling the code\n"
-    exit
-fi
-
-while true; do
-    echo -e "\nUPX degrades performances but in the case of acme-downloader it is not noticeable\n"
-    read -p "Do you wish to run upx against ${BIN_NAME}? (y/n) " yn
-    case $yn in
-    [Yy]*)
-        echo ""
-        run_upx
-        break
-        ;;
-    [Nn]*) break ;;
-    *)
-        echo "Please answer Y|y or N|n."
-        ;;
-    esac
-done
-
-echo -e "\nthe binary was compiled and it is avilable as:\n - ${GOPATH}/bin/${BIN_NAME}\n"
diff --git a/build.sh b/build.sh
index 5f55250..887e4e7 100755
--- a/build.sh
+++ b/build.sh
@@ -7,8 +7,6 @@ PATH=$PATH:$(go env GOPATH)/bin
 GOPATH=$(go env GOPATH)
 PROG_VERSION="1.0"
 BUILDTIME=$(date -u '+%Y-%m-%d_%H:%M:%S')
-export PATH GOPATH PROG_VERSION BUILDTIME
-
 REPO_DIR=$(dirname $0)
 if [ "$REPO_DIR" = '.' ]; then
     REPO_DIR=`pwd`
@@ -17,6 +15,8 @@ ln -sf "$REPO_DIR" "${GOPATH}/src/"
 REPO_NAME=$(basename "$REPO_DIR")
 cd "${GOPATH}/src/$REPO_NAME"
 
+export PATH GOPATH
+
 usage() {
     echo "Usage: $(basename $0)"
     echo "    -h | --help [Print this help and exit]"
@@ -69,7 +69,6 @@ if [ $? -gt 0 ]; then
 fi
 
 EXECUTABLE_PATH="${GOPATH}/bin/${PLATFORM}_${ARCH}/${BIN_NAME}"
-echo $EXECUTABLE_PATH
 [ -f $EXECUTABLE_PATH ] || EXECUTABLE_PATH="${GOPATH}/bin/${BIN_NAME}"
 
 run_upx() {
-- 
GitLab