mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-16 07:58:04 +00:00
be2beeff4e
PR: ports/125369 Submitted by: Alex Kozlov <spam@rm-rf.kiev.ua> Approved by: gabor (mentor, implicit)
14 lines
289 B
Bash
14 lines
289 B
Bash
#!/bin/sh
|
|
|
|
PATH=/bin:/usr/local/bin
|
|
|
|
STOREDIR="${HOME}/.screenshots"
|
|
SHOTDATE="$(date +%Y.%m.%d-%H.%M.%S)"
|
|
SHOTNAME="${STOREDIR}/screenshot-${SHOTDATE}.png"
|
|
|
|
if [ ! -d "${STOREDIR}" ]; then
|
|
mkdir "${STOREDIR}"
|
|
fi
|
|
|
|
xwd -root | xwdtopnm 2>/dev/null | pnmtopng 2>/dev/null > "${SHOTNAME}"
|