added variable for utilities location

This commit is contained in:
Nathaniel Landau
2015-05-26 21:48:57 -04:00
parent e1cf039dee
commit d2a3c9632d

View File

@@ -19,13 +19,20 @@ scriptTemplateVersion="1.3.0" # Version of scriptTemplate.sh that this script is
#
# ##################################################
# Provide a variable with the location of this script.
scriptPath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Source Scripting Utilities
# -----------------------------------
# If these can't be found, update the path to the file
# These shared utilities provide many functions which are needed to provide
# the functionality in this boilerplate. This script will fail if they can
# not be found.
# -----------------------------------
scriptPath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -f "${scriptPath}/lib/utils.sh" ]; then
source "${scriptPath}/lib/utils.sh"
utilsLocation="${scriptPath}/lib/utils.sh" # Update this path to find the utilities.
if [ -f "${utilsLocation}" ]; then
source "${utilsLocation}"
else
echo "Please find the file util.sh and add a reference to it in this script. Exiting."
exit 1