My personal project and infrastructure archive
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#!/usr/bin/env ruby
|
|
|
|
# A function to capture a picture with gphoto2, retrying 3-times in
|
|
# case of errors.
|
|
def capture_picture
|
|
3.times do
|
|
break if `gphoto2 --capture-image` == 0
|
|
puts "Retrying gphoto2 capture..."
|
|
end
|
|
end
|
|
|
|
|
|
capture_picture
|
|
|