mirror of
https://github.com/martinvonz/jj.git
synced 2024-09-11 13:56:29 +03:00
demos: replace printf by regular shell variable expansion
This makes it clearer where each variable goes since they're not all called "%s". I'm about to add more variables.
This commit is contained in:
parent
33bf6ce1d5
commit
2a5f0991fa
@ -45,14 +45,14 @@ new_tmp_dir() {
|
|||||||
|
|
||||||
run_demo() {
|
run_demo() {
|
||||||
local title="$1"
|
local title="$1"
|
||||||
local expect_script="$2"
|
local test_script="$2"
|
||||||
expect_script=$(printf "source $BASE_DIR/demo_helpers.tcl
|
local expect_script="source $BASE_DIR/demo_helpers.tcl
|
||||||
spawn asciinema rec -c \"PS1='$ ' bash --norc\" --title \"$title\"
|
spawn asciinema rec -c \"PS1='$ ' bash --norc\" --title \"$title\"
|
||||||
expect_prompt
|
expect_prompt
|
||||||
%s
|
$test_script
|
||||||
quit_and_dump_asciicast_path
|
quit_and_dump_asciicast_path
|
||||||
" "$expect_script")
|
"
|
||||||
|
|
||||||
if [[ "$DEBUG" == true ]]; then
|
if [[ "$DEBUG" == true ]]; then
|
||||||
echo "$expect_script" | /usr/bin/env expect
|
echo "$expect_script" | /usr/bin/env expect
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user