From bc7b88a131d14bf8966569a739ea8c2aff3dd1f3 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 19 Apr 2026 10:07:48 +0200 Subject: Updated camera script not to check if the output directory exists, added --verbose option, updated help. --- camera/camera | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/camera/camera b/camera/camera index 04c2d6c..8c5fdf3 100755 --- a/camera/camera +++ b/camera/camera @@ -19,6 +19,8 @@ camera_help() { echo " --awb " echo " --directory " echo " --output " + echo " --zoom" + echo " --verbose" } # Directory to save images to @@ -111,6 +113,10 @@ while [[ $# -gt 0 ]]; do fi shift ;; + -v|--verbose) + VERBOSE="yes" + shift + ;; -z|--zoom) ZOOM="yes" shift @@ -130,11 +136,11 @@ while [[ $# -gt 0 ]]; do esac done -# check if the output directory exists -if [ ! -d "${DIRECTORY}" ]; then - echo "Error: directory ${DIRECTORY} does not exist" - exit 2 -fi +# check if the output directory exists - this might be a link +#if [ ! -d "${DIRECTORY}" ]; then +# echo "Error: directory ${DIRECTORY} does not exist" +# exit 2 +#fi # default capture command CMD_CONTROL="--keypress" @@ -160,7 +166,10 @@ if [[ "${OPTION_TIMELAPSE}" = "yes" ]]; then fi fi -CMD_EXEC="rpicam-still --verbose --timeout 0 --fullscreen " +CMD_EXEC="rpicam-still --timeout 0 --fullscreen " +if [[ "${VERBOSE}" = "yes" ]]; then + CMD_EXEC+=" --verbose " +fi if [[ "${ZOOM}" = "yes" ]]; then CMD_EXEC+="--viewfinder-width 800 --viewfinder-height 600 " fi -- cgit v1.2.3