From 4b0671205d230961c162e2fd59ab9a49e3641ac6 Mon Sep 17 00:00:00 2001 From: Cameron Sparr Date: Wed, 19 Aug 2015 15:02:55 -0600 Subject: [PATCH] packaging script fix, make_dir_tree is req'd --- package.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/package.sh b/package.sh index 881b71b78..57a96d251 100755 --- a/package.sh +++ b/package.sh @@ -64,6 +64,28 @@ usage() { cleanup_exit $1 } +# make_dir_tree creates the directory structure within the packages. +make_dir_tree() { + work_dir=$1 + version=$2 + mkdir -p $work_dir/$INSTALL_ROOT_DIR/versions/$version/scripts + if [ $? -ne 0 ]; then + echo "Failed to create installation directory -- aborting." + cleanup_exit 1 + fi + mkdir -p $work_dir/$CONFIG_ROOT_DIR + if [ $? -ne 0 ]; then + echo "Failed to create configuration directory -- aborting." + cleanup_exit 1 + fi + mkdir -p $work_dir/$LOGROTATE_DIR + if [ $? -ne 0 ]; then + echo "Failed to create configuration directory -- aborting." + cleanup_exit 1 + fi + +} + # cleanup_exit removes all resources created during the process and exits with # the supplied returned code. cleanup_exit() { @@ -175,6 +197,7 @@ if [ "$CIRCLE_BRANCH" == "" ]; then fi check_gopath do_build $VERSION +make_dir_tree $TMP_WORK_DIR $VERSION ########################################################################### # Copy the assets to the installation directories.