Gentoo Archives: gentoo-user

From: Daniel Campbell <zlg@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: maim screenshooting
Date: Thu, 03 Aug 2017 05:36:40
Message-Id: 1f9fb7d5-c80f-718e-6703-a6215c18bc1f@gentoo.org
In Reply to: [gentoo-user] Re: maim screenshooting by Ian Zimmerman
1 On 08/01/2017 10:00 AM, Ian Zimmerman wrote:
2 > On 2017-08-01 03:00, Daniel Campbell wrote:
3 >
4 >> # Add '-s' to interactively set the window to be captured.
5 >> screenie() {
6 >> local curdir=$(pwd)
7 >> local shotname=$(date +%Y-%m-%d_%H-%M).png
8 >> echo "5 seconds! Go go go!"
9 >> cd ~/img/screens/comp/
10 >> scrot -d 5 -q 70 "$shotname" ${@}
11 >> echo "Screen taken! Find it under ~/img/screens/comp."
12 >> cd $curdir
13 >> }
14 >>
15 >> (now that I'm looking at it, it could use a spruce up to use pushd/popd
16 >> instead of storing the starting dir in a variable...)
17 >
18 > pushd and popd are bashisms, your current way works with any POSIX shell.
19 >
20 That's good to know!
21
22 I went in search of a few portable shell resources. Some suggest to use
23 dash or posh for the testing environment. I also found shellcheck, which
24 looks pretty promising (and it's in the tree! Thanks jlec). Do you have
25 any experience in portable shell scripting? My web search didn't return
26 a whole lot of good resources. Mostly just Stack Overflow and a few
27 tutorials which pointed to other resources.
28
29 What do you suggest?
30 --
31 Daniel Campbell - Gentoo Developer
32 OpenPGP Key: 0x1EA055D6 @ hkp://keys.gnupg.net
33 fpr: AE03 9064 AE00 053C 270C 1DE4 6F7A 9091 1EA0 55D6

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] Re: maim screenshooting R0b0t1 <r030t1@×××××.com>
[gentoo-user] Re: maim screenshooting Ian Zimmerman <itz@××××××××××××.org>