Download:
child 50:55673692e5cf
parent 48:1af673a1af4d
49:bcea0d567333
Anton Shestakov <engored@ya.ru>, Thu, 04 Sep 2014 15:28:56 +0900
Smarter make-screenshots.sh.

1 файлов изменено, 6 вставок(+), 1 удалений(-) [+]
docs/make-screenshots.sh file | annotate | diff | comparison | revisions
--- a/docs/make-screenshots.sh Thu Sep 04 14:28:14 2014 +0900
+++ b/docs/make-screenshots.sh Thu Sep 04 15:28:56 2014 +0900
@@ -1,6 +1,10 @@
#!/bin/bash
-command -v import &>/dev/null || { echo "this needs imagemagick's import command"; exit 1; }
+command -v import &>/dev/null || { echo "this needs imagemagick"; exit 1; }
+
+[[ $TERM == 'linux' ]] && { echo "this doesn't work in a tty"; exit 2; }
+
+[[ $(tput cols) -le 100 ]] && { echo 'Maximize the terminal window and press enter.'; read; }
cd "$(dirname "${BASH_SOURCE[0]}")"
@@ -8,6 +12,7 @@
clear
grep -v '^\s*\(#\|$\)' "./prompt-session-${what}.sh" | bash -i
+ sleep 1
import -window $WINDOWID "./prompt-${what}.png"
mogrify -trim -background black -extent 800x "./prompt-${what}.png"
done