Skip to content

Commit

Permalink
Merge pull request #754 from thomasjacquin/endOfNight.sh-order
Browse files Browse the repository at this point in the history
endOfNight.sh: source variables.sh first
  • Loading branch information
linuxkidd authored Nov 3, 2021
2 parents 983f7fb + bd83312 commit 164832f
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions scripts/endOfNight.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

ME="$(basename "${BASH_ARGV0}")"

# Allow this script to be executed manually, which requires several variables to be set.
if [ -z "${ALLSKY_HOME}" ] ; then
export ALLSKY_HOME=$(realpath $(dirname "${BASH_ARGV0}")/..)
fi

source "${ALLSKY_HOME}/variables.sh"
source "${ALLSKY_CONFIG}/config.sh"
source "${ALLSKY_SCRIPTS}/filename.sh"
source "${ALLSKY_CONFIG}/ftp-settings.sh"

if [ $# -eq 1 ] ; then
if [ "${1}" = "-h" -o "${1}" = "--help" ] ; then
echo -e "${RED}Usage: ${ME} [YYYYmmdd]${NC}"
Expand All @@ -13,16 +23,6 @@ else
DATE=$(date -d '12 hours ago' +'%Y%m%d')
fi

# Allow this script to be executed manually, which requires several variables to be set.
if [ -z "$ALLSKY_HOME" ] ; then
export ALLSKY_HOME=$(realpath $(dirname "${BASH_ARGV0}")/..)
fi

source "${ALLSKY_HOME}/variables.sh"
source "${ALLSKY_CONFIG}/config.sh"
source "${ALLSKY_SCRIPTS}/filename.sh"
source "${ALLSKY_CONFIG}/ftp-settings.sh"

# Nasty JQ trick to compose a widthxheight string if both width and height
# are defined in the config file and are non-zero. If this check fails, then
# IMGSIZE will be empty and it won't be used later on. If the check passes
Expand Down

0 comments on commit 164832f

Please sign in to comment.