From 915e456ecf446e84c5380b41743e585bccfc0756 Mon Sep 17 00:00:00 2001 From: Philip O'Toole Date: Wed, 25 Feb 2015 09:55:12 -0800 Subject: [PATCH] Explicitly name installation binaries Fixes #1734. --- package.sh | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/package.sh b/package.sh index fbcac35804..f9fe1f0900 100755 --- a/package.sh +++ b/package.sh @@ -49,6 +49,11 @@ MAINTAINER=support@influxdb.com VENDOR=Influxdb DESCRIPTION="Distributed time-series database" +BINS=( + influxd + influx + ) + ########################################################################### # Helper functions. @@ -134,7 +139,9 @@ do_build() { cleanup_exit 1 fi - rm $GOPATH/bin/* + for b in ${BINS[*]}; do + rm -f $GOPATH/bin/$b + done go get -u -f ./... if [ $? -ne 0 ]; then echo "WARNING: failed to 'go get' packages." @@ -207,12 +214,14 @@ make_dir_tree $TMP_WORK_DIR $VERSION ########################################################################### # Copy the assets to the installation directories. -cp $GOPATH/bin/* $TMP_WORK_DIR/$INSTALL_ROOT_DIR/versions/$VERSION -if [ $? -ne 0 ]; then - echo "Failed to copy binaries to packaging directory -- aborting." - cleanup_exit 1 -fi -echo "Binaries in $GOPATH/bin copied to $TMP_WORK_DIR/$INSTALL_ROOT_DIR/versions/$VERSION" +for b in ${BINS[*]}; do + cp $GOPATH/bin/$b $TMP_WORK_DIR/$INSTALL_ROOT_DIR/versions/$VERSION + if [ $? -ne 0 ]; then + echo "Failed to copy binaries to packaging directory -- aborting." + cleanup_exit 1 + fi +done +echo "${BINS[*]} copied to $TMP_WORK_DIR/$INSTALL_ROOT_DIR/versions/$VERSION" cp $INITD_SCRIPT $TMP_WORK_DIR/$INSTALL_ROOT_DIR/versions/$VERSION/scripts if [ $? -ne 0 ]; then