.git/hooks/post-commit
. #!/usr/bin/env ruby file="~/.gitshots/#{Time.now.to_i}.jpg" puts "Taking capture into #{file}!" system "imagesnap -q -w 3 #{file}" exit 0
#!/usr/bin/env perl use strict; use warnings; unless ( -d $ENV{"HOME"}."/.gitpix" ) { mkdir $ENV{"HOME"}."/.gitpix" or die "$!\n"; } my $file="~/.gitpix/pic-".time.".jpg"; print "Saving image from webcam to $file.\n"; system "fswebcam $file" or die "$!\n";
Source: https://habr.com/ru/post/146418/
All Articles