blob: 5fdc8a132f37170fcd6803c7a080c2ce1a9b40c6 (
plain) (
tree)
|
|
#!/bin/bash
set -xe
umask 0077
p=`rev <<<$0 | cut -d/ -f1 | rev`
t=`mktemp -p "" -d $p.XXX`
librewolf --headless --profile $t --no-remote --new-instance --screenshot $t/screenshot.png $1
mount | grep "on /proc type proc" | grep hidepid=invisible || echo POZOR! leakal bom ime datoteke v procfs! POPRAVI!!!
h=`sha256sum $t/screenshot.png | cut -d\ -f1`
[ -f ../www/studisfri/$h.png ] && echo datoteka_že_obstaja
mv $t/screenshot.png ../www/studisfri/$h.png
chmod o+r ../www/studisfri/$h.png
echo zgoščena_vrednost $h
rm -r $t
|