Skip to content

Commit

Permalink
Merge pull request #873 from thomasjacquin/generateForDay.sh-EXIT_CODE
Browse files Browse the repository at this point in the history
generateForDay.sh: bug fix $EXIT_CODE
  • Loading branch information
EricClaeys authored Dec 28, 2021
2 parents a3895bc + 2c6611d commit d20a3fe
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions scripts/generateForDay.sh
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,10 @@ if [ "${DO_KEOGRAM}" = "true" ] ; then
if [ "${TYPE}" = "GENERATE" ]; then
CMD="'${ALLSKY_HOME}/keogram' ${SIZE_FILTER} -d '${DATE_DIR}' -e ${EXTENSION} -o '${UPLOAD_FILE}' ${KEOGRAM_EXTRA_PARAMETERS}"
generate "Keogram" "keogram" "${CMD}"
let EXIT_CODE=${EXIT_CODE}+${?}
else
upload "Keogram" "${UPLOAD_FILE}" "${KEOGRAM_DIR}" "${KEOGRAM_FILE}" "${KEOGRAM_DESTINATION_NAME}" "${WEB_KEOGRAM_DIR}"
let EXIT_CODE=${EXIT_CODE}+${?}
fi
[ $? -ne 0 ] && let EXIT_CODE=${EXIT_CODE}+1
fi

if [ "${DO_STARTRAILS}" = "true" ] ; then
Expand All @@ -193,11 +192,10 @@ if [ "${DO_STARTRAILS}" = "true" ] ; then
if [ "${TYPE}" = "GENERATE" ]; then
CMD="'${ALLSKY_HOME}/startrails' ${SIZE_FILTER} -d '${DATE_DIR}' -e ${EXTENSION} -b ${BRIGHTNESS_THRESHOLD} -o '${UPLOAD_FILE}' ${STARTRAILS_EXTRA_PARAMETERS}"
generate "Startrails, threshold=${BRIGHTNESS_THRESHOLD}" "startrails" "${CMD}"
let EXIT_CODE=${EXIT_CODE}+${?}
else
upload "Startrails" "${UPLOAD_FILE}" "${STARTRAILS_DIR}" "${STARTRAILS_FILE}" "${STARTRAILS_DESTINATION_NAME}" "${WEB_STARTRAILS_DIR}"
let EXIT_CODE=${EXIT_CODE}+${?}
fi
[ $? -ne 0 ] && let EXIT_CODE=${EXIT_CODE}+1
fi

if [ "${DO_TIMELAPSE}" = "true" ] ; then
Expand All @@ -206,11 +204,10 @@ if [ "${DO_TIMELAPSE}" = "true" ] ; then
if [ "${TYPE}" = "GENERATE" ]; then
CMD="'${ALLSKY_SCRIPTS}/timelapse.sh' ${DATE}"
generate "Timelapse" "" "${CMD}" # it creates the necessary directory
let EXIT_CODE=${EXIT_CODE}+${?}
else
upload "Timelapse" "${UPLOAD_FILE}" "${VIDEOS_DIR}" "${VIDEOS_FILE}" "${VIDEOS_DESTINATION_NAME}" "${WEB_VIDEOS_DIR}"
let EXIT_CODE=${EXIT_CODE}+${?}
fi
[ $? -ne 0 ] && let EXIT_CODE=${EXIT_CODE}+1
fi


Expand Down

0 comments on commit d20a3fe

Please sign in to comment.