diff options
| author | Stijn Buys <ingar@telenet.be> | 2026-04-19 10:07:48 +0200 |
|---|---|---|
| committer | Stijn Buys <ingar@telenet.be> | 2026-04-19 10:07:48 +0200 |
| commit | bc7b88a131d14bf8966569a739ea8c2aff3dd1f3 (patch) | |
| tree | 2756ca074bd68344f4269ffc32d3627c8434e647 | |
| parent | 71886d6e1f011b12da159bb492a46d5537fcdf14 (diff) | |
Updated camera script not to check if the output directory exists, added --verbose option, updated help.
| -rwxr-xr-x | camera/camera | 21 |
1 files 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 <auto, incandescent, tungsten, fluorescent, indoor, daylight, cloudy, custom>" echo " --directory <directory to save images>" echo " --output <filename>" + 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 |
