packaging script fix, make_dir_tree is req'd

This commit is contained in:
Cameron Sparr 2015-08-19 15:02:55 -06:00
parent db634f4c0b
commit 4b0671205d
1 changed files with 23 additions and 0 deletions

View File

@ -64,6 +64,28 @@ usage() {
cleanup_exit $1 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 # cleanup_exit removes all resources created during the process and exits with
# the supplied returned code. # the supplied returned code.
cleanup_exit() { cleanup_exit() {
@ -175,6 +197,7 @@ if [ "$CIRCLE_BRANCH" == "" ]; then
fi fi
check_gopath check_gopath
do_build $VERSION do_build $VERSION
make_dir_tree $TMP_WORK_DIR $VERSION
########################################################################### ###########################################################################
# Copy the assets to the installation directories. # Copy the assets to the installation directories.