From ffab5c3cf175abee7e022ae30a5a0ef88275744f Mon Sep 17 00:00:00 2001 From: oscarkramer Date: Thu, 10 Dec 2015 15:31:35 -0500 Subject: [PATCH 1/2] Modified script to create link instead of copying install.zip --- scripts/linux/install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/linux/install.sh b/scripts/linux/install.sh index 13942dbc9..f58880102 100755 --- a/scripts/linux/install.sh +++ b/scripts/linux/install.sh @@ -65,16 +65,16 @@ if [ "$DO_ZIP" == "zip" ] ; then TIMESTAMP=`date +%Y-%m-%d` FILENAME_TS="install_$TIMESTAMP.zip" zip -r $FILENAME_TS $INSTALL_DIRNAME - - # Make a copy that can be used as artifact of latest build/install. This will overwrite previous sandboxes so only - # the latest is used for testing (standalone) or generating expected results - cp $FILENAME_TS install.zip - if [ $? -ne 0 ]; then echo; echo "ERROR: Error encountered while zipping the install dir. Check the console log and correct." popd exit 1 fi + + # Create a link that can be used as artifact of latest build/install. This will overwrite previous sandboxes so only + # the latest is used for testing (standalone) or generating expected results + ln -s $FILENAME_TS install.zip + echo "STATUS: Successfully zipped install dir to <$PWD/$FILENAME> and made a copy (install.zip)" popd # Out of dir containing install subdir fi From 4bfda5eeb10fc03920f946c97104c5710a363844 Mon Sep 17 00:00:00 2001 From: oscarkramer Date: Fri, 11 Dec 2015 11:12:38 -0500 Subject: [PATCH 2/2] Moved install to GoCD --- scripts/linux/install.sh | 84 ---------------------------------------- 1 file changed, 84 deletions(-) delete mode 100755 scripts/linux/install.sh diff --git a/scripts/linux/install.sh b/scripts/linux/install.sh deleted file mode 100755 index f58880102..000000000 --- a/scripts/linux/install.sh +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/bash -############################################################################### -# -# Install script for ossimlabs -# -# This script can be run from anywhere. It performs two functions: -# -# 1. performs a make install, and -# 2. optionally, zips the install directory for use as sandbox or artifact. -# -# No env vars need to be predefined. The install output will be written to -# $OSSIM_DEV_HOME/install where $OSSIM_DEV_HOME is the top-level -# folder containing all OSSIM repositories (including this one). -# -# For customized output location, you can define the env var OSSIM_INSTALL_PREFIX -# prior to building Makefiles, and the output will be written there. -# -# If argument "zip" is provided, the install directory will be zipped and -# written to the same directory containing the install subdirectory -# -############################################################################### - -DO_ZIP=$1 - -SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) -pushd $SCRIPT_DIR/../../.. -OSSIM_DEV_HOME=$PWD -echo "STATUS: Setting OSSIM_DEV_HOME = <$OSSIM_DEV_HOME>" - -echo "STATUS: Checking presence of env var OSSIM_BUILD_DIR = <$OSSIM_BUILD_DIR>..."; -if [ -z $OSSIM_BUILD_DIR ]; then - OSSIM_BUILD_DIR=$OSSIM_DEV_HOME/build; - if [ ! -d $OSSIM_BUILD_DIR ] ; then - echo "ERROR: OSSIM_BUILD_DIR = <$OSSIM_BUILD_DIR> does not exist at this location. Cannot install"; - exit 1; - fi -fi - -if [ -z $OSSIM_INSTALL_PREFIX ]; then - OSSIM_INSTALL_PREFIX=$OSSIM_DEV_HOME/install; - echo "INFO: OSSIM_INSTALL_DIR environment variable is not defined. Defaulting to <$OSSIM_INSTALL_PREFIX>"; -fi - -if [ ! -d $OSSIM_INSTALL_PREFIX ] ; then - echo "INFO: Installation directory <$OSSIM_INSTALL_PREFIX> does not exist. Creating..."; - mkdir $OSSIM_INSTALL_PREFIX; -fi - -pushd $OSSIM_BUILD_DIR -echo "STATUS: Performing make install to <$OSSIM_INSTALL_PREFIX>" -make install -if [ $? -ne 0 ]; then - echo; echo "ERROR: Error encountered during make install. Check the console log and correct." - popd - exit 1 -fi -echo; echo "STATUS: Install completed successfully. Install located in $OSSIM_INSTALL_PREFIX" -popd # out of OSSIM_BUILD_DIR - -if [ "$DO_ZIP" == "zip" ] ; then - pushd $OSSIM_INSTALL_PREFIX - INSTALL_DIRNAME=${PWD##*/} - echo; echo "STATUS: Zipping up install directory: <$INSTALL_DIRNAME>..." - cd .. - TIMESTAMP=`date +%Y-%m-%d` - FILENAME_TS="install_$TIMESTAMP.zip" - zip -r $FILENAME_TS $INSTALL_DIRNAME - if [ $? -ne 0 ]; then - echo; echo "ERROR: Error encountered while zipping the install dir. Check the console log and correct." - popd - exit 1 - fi - - # Create a link that can be used as artifact of latest build/install. This will overwrite previous sandboxes so only - # the latest is used for testing (standalone) or generating expected results - ln -s $FILENAME_TS install.zip - - echo "STATUS: Successfully zipped install dir to <$PWD/$FILENAME> and made a copy (install.zip)" - popd # Out of dir containing install subdir -fi - -popd # out of OSSIM_DEV_HOME -exit 0 -