mirror of
https://github.com/natelandau/shell-scripting-templates.git
synced 2025-11-09 21:53:47 -05:00
Better sourcing of lib files
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ -f "../lib/utils.sh" ]; then
|
||||
source "../lib/utils.sh"
|
||||
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
if [ -f "${SCRIPTDIR}/../lib/utils.sh" ]; then
|
||||
source "${SCRIPTDIR}/../lib/utils.sh"
|
||||
else
|
||||
echo "You must have utils.sh to run. Exiting."
|
||||
exit 0
|
||||
echo "Please find the file util.sh and add a reference to it in this script. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# Confirm we have Dropbox
|
||||
hasDropbox
|
||||
|
||||
|
||||
Reference in New Issue
Block a user