Skip to content

Commit 7b72aea

Browse files
authored
Update generateForDay.sh: Prepend ALLSKY_
1 parent af116bf commit 7b72aea

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

scripts/generateForDay.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
ME="$( basename "${BASH_ARGV0}" )"
99

1010
#shellcheck source-path=.
11-
source "${ALLSKY_HOME}/variables.sh" || exit "${EXIT_ERROR_STOP}"
11+
source "${ALLSKY_HOME}/variables.sh" || exit "${ALLSKY_EXIT_ERROR_STOP}"
1212
#shellcheck source-path=scripts
13-
source "${ALLSKY_SCRIPTS}/functions.sh" || exit "${EXIT_ERROR_STOP}"
13+
source "${ALLSKY_SCRIPTS}/functions.sh" || exit "${ALLSKY_EXIT_ERROR_STOP}"
1414

1515
OK="true"
1616
DO_HELP="false"
@@ -123,8 +123,8 @@ usage_and_exit()
123123
else
124124
echo -e "${USAGE}"
125125
fi
126-
echo "Where:"
127-
echo " --help Displays this message and exits."
126+
echo "Arguments:"
127+
echo " --help Display this message and exit."
128128
echo " --debug Runs upload.sh in debug mode."
129129
echo " --nice n Runs with the specified nice level."
130130
echo " --upload Uploads previously-created files instead of creating them."
@@ -243,7 +243,7 @@ if [[ ${TYPE} == "GENERATE" ]]; then
243243
# shellcheck disable=SC2086
244244
GENERATE_OUTPUT="$( eval ${CMD} 2>&1 )"
245245
local RET=$?
246-
if [[ ${RET} -ne 0 && ${RET} -ne ${EXIT_PARTIAL_OK} ]]; then
246+
if [[ ${RET} -ne 0 && ${RET} -ne ${ALLSKY_EXIT_PARTIAL_OK} ]]; then
247247
E_ "${ME}: Command Failed: ${GENERATE_OUTPUT}" >&2
248248
elif [[ ${SILENT} == "false" ]]; then
249249
echo -e "\tDone"
@@ -410,7 +410,7 @@ if [[ ${DO_STARTRAILS} == "true" ]]; then
410410
[[ -n ${STARTRAILS_PARAMS} ]] && CMD+=" ${STARTRAILS_PARAMS}"
411411
generate "Startrails, threshold=${BRIGHTNESS_THRESHOLD}" "startrails" "${CMD}"
412412
RET=$?
413-
[[ ${RET} -eq 0 || ${RET} -eq ${EXIT_PARTIAL_OK} ]] && ((NUM_SUCCESS++))
413+
[[ ${RET} -eq 0 || ${RET} -eq ${ALLSKY_EXIT_PARTIAL_OK} ]] && ((NUM_SUCCESS++))
414414

415415
# ${GENERATE_OUTPUT} contains the output of the startrails command.
416416
# startrails: Minimum: .05 maximum: 0.584629 mean: 0.494671 median: 0.526751 \
@@ -440,7 +440,7 @@ if [[ ${DO_STARTRAILS} == "true" ]]; then
440440
--values ${VALUES}
441441
fi
442442

443-
if [[ ${RET} -eq ${EXIT_PARTIAL_OK} ]]; then
443+
if [[ ${RET} -eq ${ALLSKY_EXIT_PARTIAL_OK} ]]; then
444444
MSG1="The startrails file was created but has no trailed stars."
445445
MSG2="\nGo to the 'Helper Tools -> Startrails Settings'"
446446
MSG3=" page to determine what 'Brightness Threshold' to use."
@@ -457,7 +457,7 @@ if [[ ${DO_STARTRAILS} == "true" ]]; then
457457
echo "Startrails creation unable to read files; will not run timelapse." >&2
458458
fi
459459

460-
if [[ ${RET} -eq 0 || ${RET} -eq ${EXIT_PARTIAL_OK} ]]; then
460+
if [[ ${RET} -eq 0 || ${RET} -eq ${ALLSKY_EXIT_PARTIAL_OK} ]]; then
461461
# Create thumbnail of startrail
462462
RES="$( "${ALLSKY_UTILITIES}/thumbnail.sh" -t startrails -d "${DATE}" --force 2>&1 )"
463463
if [[ $? -ne 0 ]]; then

0 commit comments

Comments
 (0)