File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ while [[ $# -gt 0 ]]; do
2626 shift
2727 ;;
2828 -* )
29- echo -e " ${RED} Unknown argument '${ARG} '.${NC} " >&2
29+ E_ " Unknown argument '${ARG} '." >&2
3030 OK=" false"
3131 ;;
3232 esac
3636usage_and_exit ()
3737{
3838 local RET=${1}
39- {
40- echo
41- [[ ${RET} -ne 0 ]] && echo -en " ${RED} "
42- echo " Usage: ${ME} [--help] [--camera NUM]"
43- [[ ${RET} -ne 0 ]] && echo -en " ${NC} "
44- echo " where:"
45- echo " '--help' displays this message and exits."
46- echo " '--camera NUM' use camera number NUM."
47- exit " ${RET} "
48- } >&2
39+ exec >&2
40+ echo
41+ local USAGE=" Usage: ${ME} [--help] [--camera NUM]"
42+ if [[ ${RET} -ne 0 ]]; then
43+ E_ " ${USAGE} "
44+ else
45+ echo -e " ${USAGE} "
46+ fi
47+ echo " where:"
48+ echo " --help displays this message and exits."
49+ echo " --camera NUM use camera number NUM."
50+ exit " ${RET} "
4951}
5052
5153[[ ${DO_HELP} == " true" ]] && usage_and_exit 0
5254[[ ${OK} == " false" ]] && usage_and_exit 1
5355
5456CMD=" $( determineCommandToUse " false" " " " false" ) " || exit 1
55- if [[ ${CMD} == " raspistill" ]]; then
56- echo " ${ME} does not work with raspistill." >&2
57- exit 1
58- fi
5957
6058export LIBCAMERA_LOG_LEVELS=" ERROR,FATAL"
6159CAMERA_DATA=" ${ALLSKY_TMP} /camera_data.txt"
You can’t perform that action at this time.
0 commit comments