Download:
child 57:c40d524fc90c
parent 55:63de59630d29
56:49435f917654
Anton Shestakov <engored@ya.ru>, Sun, 07 Sep 2014 18:58:52 +0900
Make one temp dir for every prompt session, make git quiet.

4 файлов изменено, 14 вставок(+), 12 удалений(-) [+]
docs/make-screenshots.sh file | annotate | diff | comparison | revisions
docs/prompt-session-git.sh file | annotate | diff | comparison | revisions
docs/prompt-session-hg.sh file | annotate | diff | comparison | revisions
docs/prompt-session-venv.sh file | annotate | diff | comparison | revisions
--- a/docs/make-screenshots.sh Sun Sep 07 01:36:29 2014 +0900
+++ b/docs/make-screenshots.sh Sun Sep 07 18:58:52 2014 +0900
@@ -6,15 +6,17 @@
[[ $(tput cols) -le 100 ]] && { echo 'Maximize the terminal window and press enter.'; read; }
-cd "$(dirname "${BASH_SOURCE[0]}")"
+DOC_DIR=$(cd "$(dirname "$0")" && pwd)
+
+cd "$(mktemp -d)" && mkdir '~' && cd '~'
for what in 'exit' venv hg git root ; do
clear
- grep -v '^\s*\(#\|$\)' "./prompt-session-${what}.sh" | HISTFILE= bash -i
+ grep -v '^\s*\(#\|$\)' "$DOC_DIR/prompt-session-$what.sh" | HISTFILE= bash -i
sleep 1 # otherwise "$ exit" is in a superposition of showing and not showing
- import -window $WINDOWID "./prompt-${what}.png"
- mogrify -trim -background black -extent 800x "./prompt-${what}.png"
+ import -window "$WINDOWID" "$DOC_DIR/prompt-$what.png"
+ mogrify -trim -background black -extent 800x "$DOC_DIR/prompt-$what.png"
done
clear
--- a/docs/prompt-session-git.sh Sun Sep 07 01:36:29 2014 +0900
+++ b/docs/prompt-session-git.sh Sun Sep 07 18:58:52 2014 +0900
@@ -1,13 +1,13 @@
#!/bin/false
# paste this into an interactive shell
-cd "$(mktemp -d)" && git init gitrepo && cd gitrepo
+git init -q gitrepo && cd gitrepo
echo 'a' > foo
git add foo
-git commit -m 'a'
+git commit -q -m 'a'
echo 'b' >> foo
-git commit -a -m 'b'
+git commit -q -a -m 'b'
git checkout -q HEAD@{1}
-git checkout -b secret
-echo 's' >> foo && git commit -a -m 's'
+git checkout -q -b secret
+echo 's' >> foo && git commit -q -a -m 's'
git merge master --strategy=ours --no-commit
--- a/docs/prompt-session-hg.sh Sun Sep 07 01:36:29 2014 +0900
+++ b/docs/prompt-session-hg.sh Sun Sep 07 18:58:52 2014 +0900
@@ -1,7 +1,7 @@
#!/bin/false
# paste this into an interactive shell
-cd "$(mktemp -d)" && hg init hgrepo && cd hgrepo
+hg init hgrepo && cd hgrepo
echo 'a' > foo && hg add foo
hg ci -m 'a'
echo 'b' >> foo && hg ci -m 'b'
--- a/docs/prompt-session-venv.sh Sun Sep 07 01:36:29 2014 +0900
+++ b/docs/prompt-session-venv.sh Sun Sep 07 18:58:52 2014 +0900
@@ -1,5 +1,5 @@
#!/bin/false
# paste this into an interactive shell
-cd "$(mktemp -d)" && virtualenv venv && cd venv
-source ./bin/activate
+virtualenv venv
+source ./venv/bin/activate