From e0ff64cd640f23e6e3a36231625e3ff038a8ae38 Mon Sep 17 00:00:00 2001 From: Pierre Hyvernat Date: Thu, 9 May 2024 21:48:27 +0200 Subject: [PATCH] better control-c mission --- missions/index.txt | 3 +- .../{05_control-C => 05_background}/Makefile | 0 .../intermediate/05_background/ascii-art/f1 | 3 + .../intermediate/05_background/ascii-art/f2 | 4 + .../intermediate/05_background/ascii-art/f3 | 4 + .../intermediate/05_background/ascii-art/f4 | 5 + .../intermediate/05_background/ascii-art/f5 | 5 + .../intermediate/05_background/ascii-art/f6 | 4 + missions/intermediate/05_background/auto.sh | 5 + .../intermediate/05_background/charmiglio.sh | 24 ++++ missions/intermediate/05_background/check.sh | 37 ++++++ .../{05_control-C => 05_background}/goal.sh | 0 .../intermediate/05_background/goal/en.txt | 28 ++++ .../intermediate/05_background/goal/fr.txt | 29 ++++ .../i18n/en.po | 25 ++-- .../intermediate/05_background/i18n/fr.po | 33 +++++ .../i18n/it.po | 30 ++--- .../i18n/template.pot | 17 +-- .../{05_control-C => 05_background}/init.sh | 3 - missions/intermediate/05_background/test.sh | 17 +++ missions/intermediate/05_control-C/auto.sh | 24 ---- .../intermediate/05_control-C/charmiglio.sh | 96 -------------- missions/intermediate/05_control-C/clean.sh | 3 - .../intermediate/05_control-C/goal/en.txt | 28 ---- .../intermediate/05_control-C/goal/fr.txt | 29 ---- missions/intermediate/05_control-C/i18n/fr.po | 42 ------ .../intermediate/06_control-C/Charmiglio.sh | 125 ++++++++++++++++++ missions/intermediate/06_control-C/Makefile | 41 ++++++ .../ascii-art/explosion.txt | 0 .../ascii-art/fireworks.txt | 0 missions/intermediate/06_control-C/auto.sh | 24 ++++ .../{05_control-C => 06_control-C}/check.sh | 10 +- missions/intermediate/06_control-C/clean.sh | 3 + missions/intermediate/06_control-C/goal.sh | 5 + .../intermediate/06_control-C/goal/en.txt | 36 +++++ .../intermediate/06_control-C/goal/fr.txt | 36 +++++ missions/intermediate/06_control-C/i18n/en.po | 49 +++++++ missions/intermediate/06_control-C/i18n/fr.po | 48 +++++++ missions/intermediate/06_control-C/i18n/it.po | 49 +++++++ .../06_control-C/i18n/template.pot | 47 +++++++ missions/intermediate/06_control-C/init.sh | 10 ++ .../{05_control-C => 06_control-C}/test.sh | 8 +- missions/intermediate/index.txt | 3 +- 43 files changed, 713 insertions(+), 279 deletions(-) rename missions/intermediate/{05_control-C => 05_background}/Makefile (100%) create mode 100644 missions/intermediate/05_background/ascii-art/f1 create mode 100644 missions/intermediate/05_background/ascii-art/f2 create mode 100644 missions/intermediate/05_background/ascii-art/f3 create mode 100644 missions/intermediate/05_background/ascii-art/f4 create mode 100644 missions/intermediate/05_background/ascii-art/f5 create mode 100644 missions/intermediate/05_background/ascii-art/f6 create mode 100644 missions/intermediate/05_background/auto.sh create mode 100755 missions/intermediate/05_background/charmiglio.sh create mode 100644 missions/intermediate/05_background/check.sh rename missions/intermediate/{05_control-C => 05_background}/goal.sh (100%) create mode 100644 missions/intermediate/05_background/goal/en.txt create mode 100644 missions/intermediate/05_background/goal/fr.txt rename missions/intermediate/{05_control-C => 05_background}/i18n/en.po (51%) create mode 100644 missions/intermediate/05_background/i18n/fr.po rename missions/intermediate/{05_control-C => 05_background}/i18n/it.po (50%) rename missions/intermediate/{05_control-C => 05_background}/i18n/template.pot (62%) rename missions/intermediate/{05_control-C => 05_background}/init.sh (61%) create mode 100644 missions/intermediate/05_background/test.sh delete mode 100644 missions/intermediate/05_control-C/auto.sh delete mode 100755 missions/intermediate/05_control-C/charmiglio.sh delete mode 100644 missions/intermediate/05_control-C/clean.sh delete mode 100644 missions/intermediate/05_control-C/goal/en.txt delete mode 100644 missions/intermediate/05_control-C/goal/fr.txt delete mode 100644 missions/intermediate/05_control-C/i18n/fr.po create mode 100755 missions/intermediate/06_control-C/Charmiglio.sh create mode 100644 missions/intermediate/06_control-C/Makefile rename missions/intermediate/{05_control-C => 06_control-C}/ascii-art/explosion.txt (100%) rename missions/intermediate/{05_control-C => 06_control-C}/ascii-art/fireworks.txt (100%) create mode 100644 missions/intermediate/06_control-C/auto.sh rename missions/intermediate/{05_control-C => 06_control-C}/check.sh (50%) create mode 100644 missions/intermediate/06_control-C/clean.sh create mode 100644 missions/intermediate/06_control-C/goal.sh create mode 100644 missions/intermediate/06_control-C/goal/en.txt create mode 100644 missions/intermediate/06_control-C/goal/fr.txt create mode 100644 missions/intermediate/06_control-C/i18n/en.po create mode 100644 missions/intermediate/06_control-C/i18n/fr.po create mode 100644 missions/intermediate/06_control-C/i18n/it.po create mode 100644 missions/intermediate/06_control-C/i18n/template.pot create mode 100644 missions/intermediate/06_control-C/init.sh rename missions/intermediate/{05_control-C => 06_control-C}/test.sh (74%) diff --git a/missions/index.txt b/missions/index.txt index bf8394f5..01cddc07 100644 --- a/missions/index.txt +++ b/missions/index.txt @@ -5,7 +5,8 @@ misc/02_nano_journal intermediate/02_alias_journal intermediate/03_tab_spider_lair intermediate/04_bg_xeyes -intermediate/05_control-C +intermediate/05_background +intermediate/06_control-C !finding_files_maze/00_shared finding_files_maze/01_ls_cd finding_files_maze/02_tree diff --git a/missions/intermediate/05_control-C/Makefile b/missions/intermediate/05_background/Makefile similarity index 100% rename from missions/intermediate/05_control-C/Makefile rename to missions/intermediate/05_background/Makefile diff --git a/missions/intermediate/05_background/ascii-art/f1 b/missions/intermediate/05_background/ascii-art/f1 new file mode 100644 index 00000000..4b3118b4 --- /dev/null +++ b/missions/intermediate/05_background/ascii-art/f1 @@ -0,0 +1,3 @@ + .:::. + ::::: + ':::' diff --git a/missions/intermediate/05_background/ascii-art/f2 b/missions/intermediate/05_background/ascii-art/f2 new file mode 100644 index 00000000..40ea2799 --- /dev/null +++ b/missions/intermediate/05_background/ascii-art/f2 @@ -0,0 +1,4 @@ + . + _\(/_ + ./)\ + ' diff --git a/missions/intermediate/05_background/ascii-art/f3 b/missions/intermediate/05_background/ascii-art/f3 new file mode 100644 index 00000000..784393d0 --- /dev/null +++ b/missions/intermediate/05_background/ascii-art/f3 @@ -0,0 +1,4 @@ + *''* + *_\/_* + * /\ * + *..* diff --git a/missions/intermediate/05_background/ascii-art/f4 b/missions/intermediate/05_background/ascii-art/f4 new file mode 100644 index 00000000..ded7a9c4 --- /dev/null +++ b/missions/intermediate/05_background/ascii-art/f4 @@ -0,0 +1,5 @@ + : +'.\'/.' +-= o =- +.'/.\'. + : diff --git a/missions/intermediate/05_background/ascii-art/f5 b/missions/intermediate/05_background/ascii-art/f5 new file mode 100644 index 00000000..c6731730 --- /dev/null +++ b/missions/intermediate/05_background/ascii-art/f5 @@ -0,0 +1,5 @@ + . +.'.:.'. +-=:o:=- +'.':'.' + ' diff --git a/missions/intermediate/05_background/ascii-art/f6 b/missions/intermediate/05_background/ascii-art/f6 new file mode 100644 index 00000000..b3e976ec --- /dev/null +++ b/missions/intermediate/05_background/ascii-art/f6 @@ -0,0 +1,4 @@ + .''. + :_\/_: + : /\ : + '..' diff --git a/missions/intermediate/05_background/auto.sh b/missions/intermediate/05_background/auto.sh new file mode 100644 index 00000000..f9bb5b0c --- /dev/null +++ b/missions/intermediate/05_background/auto.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env sh + +set -m + +charmiglio & charmiglio & charmiglio & gsh check diff --git a/missions/intermediate/05_background/charmiglio.sh b/missions/intermediate/05_background/charmiglio.sh new file mode 100755 index 00000000..a11a8b1a --- /dev/null +++ b/missions/intermediate/05_background/charmiglio.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +. gsh_gettext.sh + +command=$(gettext "charmiglio") + + +file="$MISSION_DIR/ascii-art/f$((1 + $(RANDOM)%6))" +indent=$(echo " " | head -c "$((4 * ($(RANDOM)%8)))") + +rm -f "$GSH_TMP/charmiglio.pids" +for i in $(seq $((5 + $(RANDOM)%10))) +do + echo "$indent *" + sleep 0.1 +done + +awk -v indent="$indent" '{print indent, $0}' < "$file" + +echo $$ >> "$GSH_TMP/charmiglio.pids" + +sleep 1 + +exit 0 diff --git a/missions/intermediate/05_background/check.sh b/missions/intermediate/05_background/check.sh new file mode 100644 index 00000000..1784da88 --- /dev/null +++ b/missions/intermediate/05_background/check.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env sh + +command="$(gettext 'charmiglio')" + +PIDS=$GSH_TMP/charmiglio.pids + +_check() { + rm -f "$PIDS" + + echo "$(gettext "Let's have a look:")" + + sleep 2 + + if [ ! -f "$PIDS" ] + then + echo "$(gettext "Mmm... I didn't see anything.")" + return 1 + fi + + NB=$(cat "$PIDS" | wc -l) + cat $PIDS + echo "NB = '$NB'" + if [ "$NB" -ge 3 ] + then + echo "$(gettext "Great, that looked good!")" + return 0 + elif [ "$NB" -lt 3 ] + then + echo "$(eval_gettext "Mmm... I only saw \$NB fireworks. That's not enough.")" + return 1 + else + echo "you shouldn't see this!" + return 1 + fi +} + +_check diff --git a/missions/intermediate/05_control-C/goal.sh b/missions/intermediate/05_background/goal.sh similarity index 100% rename from missions/intermediate/05_control-C/goal.sh rename to missions/intermediate/05_background/goal.sh diff --git a/missions/intermediate/05_background/goal/en.txt b/missions/intermediate/05_background/goal/en.txt new file mode 100644 index 00000000..fc02db19 --- /dev/null +++ b/missions/intermediate/05_background/goal/en.txt @@ -0,0 +1,28 @@ +Mission goal +============ + +The king's pyrotechnician appears next to you. He asks you to fire **at least +3 of them** so he can see them from far away. + +A single firework can be created with the magical word + + $command + + +Useful commands +=============== + +$command + this (non standard) command creates a single small firework + +COMMAND & + run the given command, but don't wait until it is finished to return + The command will run in the "background". + +COMMAND1 ; COMMAND2 ; ... ; COMMANDn + run the given commands one after the other + Each command is run when the previous one is finished. + +COMMAND1 & COMMAND2 & ... & COMMANDn + run the given commands "in parallel" + All the commands are run in the "background", except the last one. diff --git a/missions/intermediate/05_background/goal/fr.txt b/missions/intermediate/05_background/goal/fr.txt new file mode 100644 index 00000000..7244ff09 --- /dev/null +++ b/missions/intermediate/05_background/goal/fr.txt @@ -0,0 +1,29 @@ +Objectif +========= + +L'artificier royal apparait à vos cotés. Il vous demande de tirer **au moins 3 +jeux d'artifices" pour qu'il puisse les voir de loin. + +Une fusée simple peut être lancée avec le mot magique + + $command + + +Commandes utiles +================ + +$command + cette commande (non standard) lance un feu d'artifice simple + +COMMANDE & + exécute la commande mais n'attend pas qu'elle soit terminée pour reprendre + l'exécution du shell + La commande s'exécute "en arrière plan". + +COMMAND1 ; COMMAND2 ; ... ; COMMANDn + exécute les commandes données, l'une après l'autre + Chaque commande est exécutée lorsque la précédente est terminée. + +COMMAND1 & COMMAND2 & ... & COMMANDn + exécute les commandes données, "en parallèle" + Toutes les commandes sont exécutées "en arrière plan", sauf la dernière. diff --git a/missions/intermediate/05_control-C/i18n/en.po b/missions/intermediate/05_background/i18n/en.po similarity index 51% rename from missions/intermediate/05_control-C/i18n/en.po rename to missions/intermediate/05_background/i18n/en.po index f0ed9f4d..e9081ea2 100644 --- a/missions/intermediate/05_control-C/i18n/en.po +++ b/missions/intermediate/05_background/i18n/en.po @@ -16,24 +16,19 @@ msgstr "$MISSION_DIR/skip/en.txt" msgid "$MISSION_DIR/treasure-msg/en.txt" msgstr "$MISSION_DIR/treasure-msg/en.txt" -msgid "Don't interrupt me when I'm in a trance!!!" -msgstr "Don't interrupt me when I'm in a trance!!!" +msgid "Great, that looked good!" +msgstr "Great, that looked good!" -#, sh-format -msgid "Found it! The special incantation is $n" -msgstr "Found it! The special incantation is $n" - -msgid "Merlin mumbles " -msgstr "Merlin mumbles " - -msgid "NOTE: you need to interrupt Merlin before he wakes up." -msgstr "NOTE: you need to interrupt Merlin before he wakes up." +msgid "Let's have a look:" +msgstr "Let's have a look:" -msgid "Sorry, I fell asleep... Let's try again." -msgstr "Sorry, I fell asleep... Let's try again." +#, sh-format +msgid "Mmm... I didn't see anything." +msgstr "Mmm... I didn't see anything." -msgid "What's the fireworks incantation?" -msgstr "What's the fireworks incantation?" +#, sh-format +msgid "Mmm... I only saw $NB fireworks. That's not enough." +msgstr "Mmm... I only saw $NB fireworks. That's not enough." msgid "charmiglio" msgstr "charmiglio" diff --git a/missions/intermediate/05_background/i18n/fr.po b/missions/intermediate/05_background/i18n/fr.po new file mode 100644 index 00000000..5347729e --- /dev/null +++ b/missions/intermediate/05_background/i18n/fr.po @@ -0,0 +1,33 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8\n" + "Content-Transfer-Encoding: 8bit\n" + +# path for the text file containing the goal +#, sh-format +msgid "$MISSION_DIR/goal/en.txt" +msgstr "$MISSION_DIR/goal/fr.txt" + +# path for the text file containing the skip message +msgid "$MISSION_DIR/skip/en.txt" +msgstr "$MISSION_DIR/skip/fr.txt" + +# path for the text file containing the treasure message +msgid "$MISSION_DIR/treasure-msg/en.txt" +msgstr "$MISSION_DIR/treasure-msg/fr.txt" + +msgid "Great, that looked good!" +msgstr "Super, c'était très joli !" + +msgid "Let's have a look:" +msgstr "Regardons à quoi ça ressemble :" + +#, sh-format +msgid "Mmm... I didn't see anything." +msgstr "Mmm... Je n'ai rien vu." + +#, sh-format +msgid "Mmm... I only saw $NB fireworks. That's not enough." +msgstr "Mmm... Je n'ai vu que $NB feux d'artifices. Ce n'est pas assez." + +msgid "charmiglio" +msgstr "charmiglio" diff --git a/missions/intermediate/05_control-C/i18n/it.po b/missions/intermediate/05_background/i18n/it.po similarity index 50% rename from missions/intermediate/05_control-C/i18n/it.po rename to missions/intermediate/05_background/i18n/it.po index 3f142971..cfe0e351 100644 --- a/missions/intermediate/05_control-C/i18n/it.po +++ b/missions/intermediate/05_background/i18n/it.po @@ -1,3 +1,4 @@ +# AUTOMATICALLY GENERATED -- DO NOT EDIT msgid "" msgstr "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -5,7 +6,7 @@ msgstr "Content-Type: text/plain; charset=UTF-8\n" # path for the text file containing the goal #, sh-format msgid "$MISSION_DIR/goal/en.txt" -msgstr "$MISSION_DIR/goal/it.txt" +msgstr "$MISSION_DIR/goal/en.txt" # path for the text file containing the skip message msgid "$MISSION_DIR/skip/en.txt" @@ -15,24 +16,19 @@ msgstr "" msgid "$MISSION_DIR/treasure-msg/en.txt" msgstr "" -msgid "Don't interrupt me when I'm in a trance!!!" -msgstr "" - -#, sh-format -msgid "Found it! The special incantation is $n" -msgstr "" - -msgid "Merlin mumbles " -msgstr "" +msgid "Great, that looked good!" +msgstr "Great, that looked good!" -msgid "NOTE: you need to interrupt Merlin before he wakes up." -msgstr "" +msgid "Let's have a look:" +msgstr "Let's have a look:" -msgid "Sorry, I fell asleep... Let's try again." -msgstr "" +#, sh-format +msgid "Mmm... I didn't see anything." +msgstr "Mmm... I didn't see anything." -msgid "What's the fireworks incantation?" -msgstr "" +#, sh-format +msgid "Mmm... I only saw $NB fireworks. That's not enough." +msgstr "Mmm... I only saw $NB fireworks. That's not enough." msgid "charmiglio" -msgstr "" +msgstr "charmiglio" diff --git a/missions/intermediate/05_control-C/i18n/template.pot b/missions/intermediate/05_background/i18n/template.pot similarity index 62% rename from missions/intermediate/05_control-C/i18n/template.pot rename to missions/intermediate/05_background/i18n/template.pot index 9d60e3bd..b96ab195 100644 --- a/missions/intermediate/05_control-C/i18n/template.pot +++ b/missions/intermediate/05_background/i18n/template.pot @@ -15,23 +15,18 @@ msgstr "" msgid "$MISSION_DIR/treasure-msg/en.txt" msgstr "" -msgid "Don't interrupt me when I'm in a trance!!!" +msgid "Great, that looked good!" msgstr "" -#, sh-format -msgid "Found it! The special incantation is $n" -msgstr "" - -msgid "Merlin mumbles " +msgid "Let's have a look:" msgstr "" -msgid "NOTE: you need to interrupt Merlin before he wakes up." -msgstr "" - -msgid "Sorry, I fell asleep... Let's try again." +#, sh-format +msgid "Mmm... I didn't see anything." msgstr "" -msgid "What's the fireworks incantation?" +#, sh-format +msgid "Mmm... I only saw $NB fireworks. That's not enough." msgstr "" msgid "charmiglio" diff --git a/missions/intermediate/05_control-C/init.sh b/missions/intermediate/05_background/init.sh similarity index 61% rename from missions/intermediate/05_control-C/init.sh rename to missions/intermediate/05_background/init.sh index ea16e3e9..4e0fba64 100644 --- a/missions/intermediate/05_control-C/init.sh +++ b/missions/intermediate/05_background/init.sh @@ -1,9 +1,6 @@ #!/usr/bin/env sh _mission_init() { - # nb of tries to make - echo $((3 + $(RANDOM) % 3)) > "$GSH_TMP/control-C" - copy_bin "$MISSION_DIR/charmiglio.sh" "$GSH_BIN/$(gettext charmiglio)" } _mission_init diff --git a/missions/intermediate/05_background/test.sh b/missions/intermediate/05_background/test.sh new file mode 100644 index 00000000..52135504 --- /dev/null +++ b/missions/intermediate/05_background/test.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env sh + +set -m + +gsh assert check false +charmiglio & gsh assert check false +charmiglio & charmiglio & gsh assert check false +charmiglio & charmiglio & charmiglio & gsh assert check true +charmiglio & charmiglio & charmiglio & charmiglio & gsh assert check true + +charmiglio & charmiglio & charmiglio +gsh assert check false + +charmiglio; charmiglio; charmiglio; +gsh assert check false + + diff --git a/missions/intermediate/05_control-C/auto.sh b/missions/intermediate/05_control-C/auto.sh deleted file mode 100644 index 4dc721f7..00000000 --- a/missions/intermediate/05_control-C/auto.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env sh - -set -m - -for _ in $(seq 6) -do - eval "$(gettext charmiglio)" 2>/dev/null & - PID=$! - sleep 3 - kill -s INT "-$PID" 2> /dev/null - - case "$(cat "$GSH_TMP/control-C")" in - *[!0-9]*) - break - ;; - *) - : - ;; - esac -done - -gsh check < "$GSH_TMP/control-C" - - diff --git a/missions/intermediate/05_control-C/charmiglio.sh b/missions/intermediate/05_control-C/charmiglio.sh deleted file mode 100755 index c1583a16..00000000 --- a/missions/intermediate/05_control-C/charmiglio.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/sh - -. gsh_gettext.sh - -control_c_start() { - [ -f "$GSH_TMP/control-C" ] || exit 255 - n=$(cat "$GSH_TMP/control-C") - case "$n" in - "" | *[!0-9]* ) - echo - echo - echo "$(eval_gettext 'Found it! The special incantation is $n')" - ;; - *) - echo - echo - echo "$(gettext "Don't interrupt me when I'm in a trance!!!")" - ;; - esac - exit 1 -} - -control_c_end() { - [ -f "$GSH_TMP/control-C" ] || exit 255 - n=$(cat "$GSH_TMP/control-C") - case "$n" in - "" | *[!0-9]* ) - echo - echo - echo "$(eval_gettext 'Found it! The special incantation is $n')" - ;; - *) - echo "$((n-1))" > "$GSH_TMP/control-C" - echo - echo - echo "$(gettext "Sorry, I fell asleep... Let's try again.")" - ;; - esac - exit 1 -} - -mumble() { - seconds=$1 # how long to mumble randomly (real time will be between $seconds and $seconds+1 - sleep=$2 # should '.' characters appears as times passes - - now=$(date +%s) - d=0 - while [ "$d" -le "$seconds" ] - do - d=$(($(date +%s) - now + 1)) - printf "$(gettext "Merlin mumbles ")" >&2 - if [ "$sleep" ] - then - # generate a string of length 26 containing more and more '.' characters - i=$((d*2)) - alpha=$(echo "xnyjqmiwkgbplvadrhfuotcsez.........................." | awk "{print substr(\$0, $i<27?$i:27, 26)}" ) - else - alpha="a-z" - fi - random_string "$((8 + $(RANDOM)%42))" | tr "a-zA-Z" "$alpha " >&2 - sleep 0.1 - done -} - -check() { - [ -f "$GSH_TMP/control-C" ] || exit 255 - n=$(cat "$GSH_TMP/control-C") - case "$n" in - "" | *[!0-9]* ) - # we already know the solution - echo - echo "$(eval_gettext 'Found it! The special incantation is $n')" - exit 0 - ;; - *) - if [ "$n" -le 0 ] - then - # if we've finished, print the solution and save it - n=$(random_string 5) - echo "$n" > "$GSH_TMP/control-C" - echo - echo "$(eval_gettext 'Found it! The special incantation is $n')" - exit 0 - fi - esac -} - -trap 'control_c_start' INT -mumble 2 # mumble for 2 second -check -trap 'control_c_end' INT -mumble 120 sleep # mumble for 2 minutes, falling to sleep -echo -echo "$(gettext "Sorry, I fell asleep... Let's try again.")" - -echo "$(gettext "NOTE: you need to interrupt Merlin before he wakes up.")" diff --git a/missions/intermediate/05_control-C/clean.sh b/missions/intermediate/05_control-C/clean.sh deleted file mode 100644 index f230756a..00000000 --- a/missions/intermediate/05_control-C/clean.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env sh - -rm -f "$GSH_TMP/control-C" diff --git a/missions/intermediate/05_control-C/goal/en.txt b/missions/intermediate/05_control-C/goal/en.txt deleted file mode 100644 index 506b3073..00000000 --- a/missions/intermediate/05_control-C/goal/en.txt +++ /dev/null @@ -1,28 +0,0 @@ -Mission goal -============ - -The wizard Merlin appears next to you and asks for your help. -You need to whisper the magic word - $ $command -to put him into a trance so that he can remember a special -incantation for creating fireworks. - -The only problem is that after a couple of seconds in a trance, -Merlin falls asleep! You thus need to interrupt him whenever -that's the case, so that he can try again. - - -NOTE: it will probably take several tries before Merlin -actually remembers the incantation - - -Useful commands -=============== - -$command - this (non standard) command puts Merlin into a trance - -Control-c (also written ^c) - pressing Control and c at the same times interrupts the current command - by sending the INT ("INTerrupt") signal to the process - diff --git a/missions/intermediate/05_control-C/goal/fr.txt b/missions/intermediate/05_control-C/goal/fr.txt deleted file mode 100644 index 18b6e95a..00000000 --- a/missions/intermediate/05_control-C/goal/fr.txt +++ /dev/null @@ -1,29 +0,0 @@ -Objectif -========= - -Le sorcier Merlin apparait à vos cotés et vous demande de -l'aide. Vous devez murmurer le mot magique - $ $command -pour le mettre dans une transe qui devrait lui permettre de -se souvenir d'une incantation spéciale pour créer des feux -d'artifice. - -Le seul problème est qu'après quelques secondes en transe, -Merlin s'endort ! Vous devez donc l'interrompre dans ce cas -pour qu'il puisse ré-essayer. - - -NOTE: il faudra probablement plusieurs essais pour que -Merlin retrouve son incantation. - - -Commandes utiles -================ - -$command - cette commande (non standard) met Merlin dans une transe - -Contrôle-c (aussi noté ^c) - appuyer sur les touches Contrôle et c en même temps interrompt - la commande en cours en envoyant le signal INT ("INTerrupt") au - processus diff --git a/missions/intermediate/05_control-C/i18n/fr.po b/missions/intermediate/05_control-C/i18n/fr.po deleted file mode 100644 index 1101d704..00000000 --- a/missions/intermediate/05_control-C/i18n/fr.po +++ /dev/null @@ -1,42 +0,0 @@ -msgid "" -msgstr "Content-Type: text/plain; charset=UTF-8\n" - "Content-Transfer-Encoding: 8bit\n" - -# path for the text file containing the goal -#, sh-format -msgid "$MISSION_DIR/goal/en.txt" -msgstr "$MISSION_DIR/goal/fr.txt" - -# path for the text file containing the skip message -msgid "$MISSION_DIR/skip/en.txt" -msgstr "" - -# path for the text file containing the treasure message -msgid "$MISSION_DIR/treasure-msg/en.txt" -msgstr "" - -msgid "Don't interrupt me when I'm in a trance!!!" -msgstr "Ne m'interromps pas pendant ma transe !!!" - -#, sh-format -msgid "Found it! The special incantation is $n" -msgstr "Trouvé ! L'incantation spéciale est $n" - -msgid "Merlin mumbles " -msgstr "Merlin marmonne " - -msgid "NOTE: you need to interrupt Merlin before he wakes up." -msgstr "NOTE : vous devez interrompre Merlin avant son réveil." - -msgid "Sorry, I fell asleep... Let's try again." -msgstr "Désolé, je m'étais endormi... Essayons encore." - -msgid "What's the fireworks incantation?" -msgstr "Quelle est l'incantation pour les feux d'artifice ?" - -msgid "charmiglio" -msgstr "charmiglio" - -#, fuzzy, sh-format -#~ msgid "Found it! The special incantion is $n" -#~ msgstr "Trouvé ! L'incantation spéciale est $n" diff --git a/missions/intermediate/06_control-C/Charmiglio.sh b/missions/intermediate/06_control-C/Charmiglio.sh new file mode 100755 index 00000000..31edfa94 --- /dev/null +++ b/missions/intermediate/06_control-C/Charmiglio.sh @@ -0,0 +1,125 @@ +#!/bin/sh + +. gsh_gettext.sh + +CODE=$1 +STATE=init + +trap 'control_c' INT +control_c() { + if [ "$STATE" = "init" ] + then + echo + echo "$(eval_gettext 'Too soon! You must leave enough time for the magical reaction to start!')" + exit 1 + else + echo + cat "$MISSION_DIR/ascii-art/explosion.txt" + echo "$(gettext "That's not working, try a different combination...")" + fi + exit 1 +} + + +indent=8 +width=16 +magical_reaction() { + seconds=$1 # how long to magical_reaction randomly (real time will be between $seconds and $seconds+1 + dud=$2 # should more '.' characters appears as times passes + + now=$(date +%s) + delay=0 + while [ "$delay" -le "$seconds" ] + do + delay=$(($(date +%s) - now)) + # NOTE: if I put $(RANDOM) inside the $((...)), interrupting the process during + # the RANDOM execution returns an empty string, and the shell complains about + # invalid arithmetic expression + r=$(RANDOM) + indent=$((indent - 2 + r%5)) + [ "$indent" -lt 0 ] && indent=0 + r=$(RANDOM) + width=$((width - 2 + r%5)) + [ "$width" -lt 1 ] && width=1 + if [ "$dud" ] + then + i=$((delay/2 + 2)) + else + i=1 + fi + alpha=$(echo "#%*():_-............." | awk "{print substr(\$0, $i<10?$i:10, 10)}" ) + printf "%*s%s\n" "$indent" '' "$(random_string "$width" "$alpha")" >&2 + sleep 0.1 + done +} + +check() { + [ -f "$GSH_TMP/control-C" ] || exit 255 + n=$(cat "$GSH_TMP/control-C") + case "$n" in + "" | *[!0-9]* ) + if [ "$n" = "$CODE" ] + then + echo + echo "$(eval_gettext 'It works! The special incantation is $CODE')" + cat "$MISSION_DIR/ascii-art/fireworks.txt" + exit 0 + else + echo "$CODE" >> "$GSH_TMP/control-C.codes" + fi + ;; + *) + if [ "$n" -le 0 ] + then + # if we've finished, print the solution and save it + echo "$CODE" > "$GSH_TMP/control-C" + echo + echo "$(eval_gettext 'It works! The special incantation is $CODE')" + cat "$MISSION_DIR/ascii-art/fireworks.txt" + exit 0 + else + echo "$CODE" >> "$GSH_TMP/control-C.codes" + echo "$((n-1))" > "$GSH_TMP/control-C" + fi + esac + STATE="final" +} + +init() { + case "$CODE" in + "") + command=$(gettext "Charmiglio") + echo "$(eval_gettext 'usage: $command CCCC + where CCCC is a sequence of 4 ASCII letters (a-zA-Z)')" + exit 1 + ;; + + *[!a-zA-Z]*) + echo "$(gettext "The incantation can only use ASCII letters.")" + exit 1 + ;; + ????) + : # 4 letters, OK + ;; + *) + echo "$(gettext "The incantation requires exactly 4 letters.")" + exit 1 + ;; + esac + + if grep -qsx "$CODE" "$GSH_TMP/control-C.codes" + then + echo "already tried!" + exit 1 + fi +} + + +init +magical_reaction 2 # magical reaction for 2 second +check +magical_reaction 600 dud # dud for 10 minutes + +echo +echo "$(gettext "That's not working, try a different combination...")" +echo "$(gettext "NOTE: you should interrupt the magical reaction after a few seconds!")" diff --git a/missions/intermediate/06_control-C/Makefile b/missions/intermediate/06_control-C/Makefile new file mode 100644 index 00000000..bd85007b --- /dev/null +++ b/missions/intermediate/06_control-C/Makefile @@ -0,0 +1,41 @@ +SH_FILES=$(wildcard *.sh) +EXCEPTIONS= +OTHER_FILES= + +LANGUAGES=$(wildcard i18n/*.po) +LANGUAGES:=$(filter-out i18n/en.po, $(LANGUAGES)) +SH_FILES:=$(filter-out $(EXCEPTIONS), $(SH_FILES)) +SORT=--sort-output +OPTIONS=--indent --no-wrap --no-location + +all: i18n/en.po $(LANGUAGES) + +add-locations: SORT=--add-location --sort-by-file +add-locations: all + +i18n/en.po: i18n/template.pot FORCE + @echo "msgen $@" + @msgen $(OPTIONS) $(SORT) i18n/template.pot --output=$@ + @echo "# AUTOMATICALLY GENERATED -- DO NOT EDIT" | cat - $@ > $@~ + @mv $@~ $@ + +$(LANGUAGES):%.po: i18n/template.pot FORCE + @echo "msgmerge $@" + @msgmerge --update $(OPTIONS) $(SORT) $@ i18n/template.pot + +i18n/template.pot: $(SH_FILES) $(OTHER_FILES) FORCE + @mkdir -p i18n/ + @echo "generating i18n/template.pot" + @xgettext --from-code=UTF-8 --omit-header $(OPTIONS) $(SORT) --join-existing --output i18n/template.pot $(SH_FILES) $(OTHER_FILES) + @echo "done" + +new: i18n/template.pot + @read -p "language code: " lang; \ + [ -e "./i18n/$$lang.po" ] && echo "file i18n/$$lang.po already exists" && exit; \ + echo "file i18n/$$lang.po created"; \ + msgcat $(OPTIONS) --output i18n/$$lang.po i18n/template.pot + +clean: + rm -f i18n/*~ + +.PHONY: all clean new FORCE diff --git a/missions/intermediate/05_control-C/ascii-art/explosion.txt b/missions/intermediate/06_control-C/ascii-art/explosion.txt similarity index 100% rename from missions/intermediate/05_control-C/ascii-art/explosion.txt rename to missions/intermediate/06_control-C/ascii-art/explosion.txt diff --git a/missions/intermediate/05_control-C/ascii-art/fireworks.txt b/missions/intermediate/06_control-C/ascii-art/fireworks.txt similarity index 100% rename from missions/intermediate/05_control-C/ascii-art/fireworks.txt rename to missions/intermediate/06_control-C/ascii-art/fireworks.txt diff --git a/missions/intermediate/06_control-C/auto.sh b/missions/intermediate/06_control-C/auto.sh new file mode 100644 index 00000000..63e4eb2c --- /dev/null +++ b/missions/intermediate/06_control-C/auto.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env sh + +set -m + + for c in a b c d e f + do + eval "$(gettext Charmiglio)" "$c$c$c$c" 2>/dev/null & + PID=$! + sleep 4 + kill -s INT "-$PID" 2> /dev/null + + case "$(cat "$GSH_TMP/control-C")" in + *[!0-9]*) + break + ;; + *) + : + ;; + esac + done + +gsh check < "$GSH_TMP/control-C" + + diff --git a/missions/intermediate/05_control-C/check.sh b/missions/intermediate/06_control-C/check.sh similarity index 50% rename from missions/intermediate/05_control-C/check.sh rename to missions/intermediate/06_control-C/check.sh index f70584c0..4497b37f 100644 --- a/missions/intermediate/05_control-C/check.sh +++ b/missions/intermediate/06_control-C/check.sh @@ -2,22 +2,22 @@ _mission_check() { r=$(cat "$GSH_TMP/control-C") - printf "%s " "$(gettext "What's the fireworks incantation?")" + printf "%s " "$(gettext "What's a valid 4 letters sequence?")" read -r n case "$r" in - "" | *[!0-9]*) + *[!a-zA-Z]*) + return 1 + ;; + ????) if [ "$n" = "$r" ] then - cat "$MISSION_DIR/ascii-art/fireworks.txt" return 0 else - cat "$MISSION_DIR/ascii-art/explosion.txt" return 1 fi ;; *) - cat "$MISSION_DIR/ascii-art/explosion.txt" return 1 esac } diff --git a/missions/intermediate/06_control-C/clean.sh b/missions/intermediate/06_control-C/clean.sh new file mode 100644 index 00000000..01fe2e36 --- /dev/null +++ b/missions/intermediate/06_control-C/clean.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +rm -f "$GSH_TMP/control-C*" diff --git a/missions/intermediate/06_control-C/goal.sh b/missions/intermediate/06_control-C/goal.sh new file mode 100644 index 00000000..2edb9b32 --- /dev/null +++ b/missions/intermediate/06_control-C/goal.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env sh + +command="$(gettext 'Charmiglio')" +sed "s/\\\$command/$command/g" "$(eval_gettext '$MISSION_DIR/goal/en.txt')" +unset command diff --git a/missions/intermediate/06_control-C/goal/en.txt b/missions/intermediate/06_control-C/goal/en.txt new file mode 100644 index 00000000..0557f438 --- /dev/null +++ b/missions/intermediate/06_control-C/goal/en.txt @@ -0,0 +1,36 @@ +Mission goal +============ + +The king's pyrotechnician is trying to remember the magical incantation +for creating the grand finale for his fireworks. This incantation starts +with the work $command and must be followed by four random letters, as +in + + $ $command abcd +or + $ $command oops + +Help the pyrotechnician by finding 4 letters producing appropriate +fireworks. + + +NOTE: when the four letters are incorrect, the magical reaction +can take a very long time. You need to interrupt it! + +It will probably take several tries before finding a combination +of letters that works. + + +Useful commands +=============== + +$command CCCC + this (non standard) command creates some fireworks + - if the four letters are valid, the fireworks will start after a few + seconds + - if the four letters are not valid, the whole magical reaction will go + on for a long time + +Control-c (also written ^c) + pressing Control and c at the same times interrupts the current command + by sending the INT ("INTerrupt") signal to the process diff --git a/missions/intermediate/06_control-C/goal/fr.txt b/missions/intermediate/06_control-C/goal/fr.txt new file mode 100644 index 00000000..b9de6d5b --- /dev/null +++ b/missions/intermediate/06_control-C/goal/fr.txt @@ -0,0 +1,36 @@ +Objectif +========= + +L'artificier royal essaie de se souvenir de l'incantation magique qui génère +le bouquet final de son grand feu d'artifices. Cette incantation commence par +le mot $command et doit être suivie de quatre lettres aléatoires comme dans + + $ $command abcd +ou + $ $command oups + +Aidez l'artificier en trouvant quatres lettres qui produisent un feu +d'artifices approprié. + + +NOTE: lorsque les quatres lettres sont incorrectes, la réaction +magique peut prendre beaucoup de temps. Il faudra l'interrompre ! + +Il est probable que vous deviez faire plusieurs essais pour +trouver une suite de quatre lettres qui fonctionne. + + +Commandes utiles +================ + +$command CCCC + cette commande (non standard) génère un feu d'artifice + - si les quatre lettres sont valides, le feu d'artifice partira + au bout de quelques secondes + - si les quatres lettres ne sont pas valides, la réaction magique + continuera pendant longtemps + +Contrôle-c (aussi noté ^c) + appuyer sur les touches Contrôle et c en même temps interrompt + la commande en cours en envoyant le signal INT ("INTerrupt") au + processus diff --git a/missions/intermediate/06_control-C/i18n/en.po b/missions/intermediate/06_control-C/i18n/en.po new file mode 100644 index 00000000..a9a48bdc --- /dev/null +++ b/missions/intermediate/06_control-C/i18n/en.po @@ -0,0 +1,49 @@ +# AUTOMATICALLY GENERATED -- DO NOT EDIT +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8\n" + "Content-Transfer-Encoding: 8bit\n" + +# path for the text file containing the goal +#, sh-format +msgid "$MISSION_DIR/goal/en.txt" +msgstr "$MISSION_DIR/goal/en.txt" + +# path for the text file containing the skip message +msgid "$MISSION_DIR/skip/en.txt" +msgstr "$MISSION_DIR/skip/en.txt" + +# path for the text file containing the treasure message +msgid "$MISSION_DIR/treasure-msg/en.txt" +msgstr "$MISSION_DIR/treasure-msg/en.txt" + +msgid "Charmiglio" +msgstr "Charmiglio" + +#, sh-format +msgid "It works! The special incantation is $CODE" +msgstr "It works! The special incantation is $CODE" + +msgid "NOTE: you should interrupt the magical reaction after a few seconds!" +msgstr "NOTE: you should interrupt the magical reaction after a few seconds!" + +msgid "That's not working, try a different combination..." +msgstr "That's not working, try a different combination..." + +msgid "The incantation can only use ASCII letters." +msgstr "The incantation can only use ASCII letters." + +msgid "The incantation requires exactly 4 letters." +msgstr "The incantation requires exactly 4 letters." + +#, sh-format +msgid "Too soon! You must leave enough time for the magical reaction to start!" +msgstr "Too soon! You must leave enough time for the magical reaction to start!" + +msgid "What's a valid 4 letters sequence?" +msgstr "What's a valid 4 letters sequence?" + +#, sh-format +msgid "usage: $command CCCC\n" + " where CCCC is a sequence of 4 ASCII letters (a-zA-Z)" +msgstr "usage: $command CCCC\n" + " where CCCC is a sequence of 4 ASCII letters (a-zA-Z)" diff --git a/missions/intermediate/06_control-C/i18n/fr.po b/missions/intermediate/06_control-C/i18n/fr.po new file mode 100644 index 00000000..48a249ed --- /dev/null +++ b/missions/intermediate/06_control-C/i18n/fr.po @@ -0,0 +1,48 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8\n" + "Content-Transfer-Encoding: 8bit\n" + +# path for the text file containing the goal +#, sh-format +msgid "$MISSION_DIR/goal/en.txt" +msgstr "$MISSION_DIR/goal/fr.txt" + +# path for the text file containing the skip message +msgid "$MISSION_DIR/skip/en.txt" +msgstr "" + +# path for the text file containing the treasure message +msgid "$MISSION_DIR/treasure-msg/en.txt" +msgstr "" + +msgid "Charmiglio" +msgstr "Charmiglio" + +#, sh-format +msgid "It works! The special incantation is $CODE" +msgstr "Ça marche ! L'incantation spéciale est $CODE" + +msgid "NOTE: you should interrupt the magical reaction after a few seconds!" +msgstr "NOTE : vous devriez interrompre la réaction magique après quelques secondes !" + +msgid "That's not working, try a different combination..." +msgstr "Ça ne marche pas, essayez une autre combinaison..." + +msgid "The incantation can only use ASCII letters." +msgstr "L'incantation ne peut utiliser que des lettres ASCII." + +msgid "The incantation requires exactly 4 letters." +msgstr "L'incantation nécessite exactement 4 lettres." + +#, sh-format +msgid "Too soon! You must leave enough time for the magical reaction to start!" +msgstr "Trop tôt ! Vous devez laisser assez de temps pour que la réaction magique commence !" + +msgid "What's a valid 4 letters sequence?" +msgstr "Qu'est-ce qu'une combinaison valide ?" + +#, sh-format +msgid "usage: $command CCCC\n" + " where CCCC is a sequence of 4 ASCII letters (a-zA-Z)" +msgstr "utilisation : $command CCCC\n" + " où CCCC est une suite de 4 lettres ASCII (a-zA-Z)" diff --git a/missions/intermediate/06_control-C/i18n/it.po b/missions/intermediate/06_control-C/i18n/it.po new file mode 100644 index 00000000..693fda76 --- /dev/null +++ b/missions/intermediate/06_control-C/i18n/it.po @@ -0,0 +1,49 @@ +# AUTOMATICALLY GENERATED -- DO NOT EDIT +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8\n" + "Content-Transfer-Encoding: 8bit\n" + +# path for the text file containing the goal +#, sh-format +msgid "$MISSION_DIR/goal/en.txt" +msgstr "$MISSION_DIR/goal/en.txt" + +# path for the text file containing the skip message +msgid "$MISSION_DIR/skip/en.txt" +msgstr "" + +# path for the text file containing the treasure message +msgid "$MISSION_DIR/treasure-msg/en.txt" +msgstr "" + +msgid "Charmiglio" +msgstr "Charmiglio" + +#, sh-format +msgid "It works! The special incantation is $CODE" +msgstr "It works! The special incantation is $CODE" + +msgid "NOTE: you should interrupt the magical reaction after a few seconds!" +msgstr "NOTE: you should interrupt the magical reaction after a few seconds!" + +msgid "That's not working, try a different combination..." +msgstr "That's not working, try a different combination..." + +msgid "The incantation can only use ASCII letters." +msgstr "The incantation can only use ASCII letters." + +msgid "The incantation requires exactly 4 letters." +msgstr "The incantation requires exactly 4 letters." + +#, sh-format +msgid "Too soon! You must leave enough time for the magical reaction to start!" +msgstr "Too soon! You must leave enough time for the magical reaction to start!" + +msgid "What's a valid 4 letters sequence?" +msgstr "What's a valid 4 letters sequence?" + +#, sh-format +msgid "usage: $command CCCC\n" + " where CCCC is a sequence of 4 ASCII letters (a-zA-Z)" +msgstr "usage: $command CCCC\n" + " where CCCC is a sequence of 4 ASCII letters (a-zA-Z)" diff --git a/missions/intermediate/06_control-C/i18n/template.pot b/missions/intermediate/06_control-C/i18n/template.pot new file mode 100644 index 00000000..416128ee --- /dev/null +++ b/missions/intermediate/06_control-C/i18n/template.pot @@ -0,0 +1,47 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8\n" + "Content-Transfer-Encoding: 8bit\n" + +# path for the text file containing the goal +#, sh-format +msgid "$MISSION_DIR/goal/en.txt" +msgstr "" + +# path for the text file containing the skip message +msgid "$MISSION_DIR/skip/en.txt" +msgstr "" + +# path for the text file containing the treasure message +msgid "$MISSION_DIR/treasure-msg/en.txt" +msgstr "" + +msgid "Charmiglio" +msgstr "" + +#, sh-format +msgid "It works! The special incantation is $CODE" +msgstr "" + +msgid "NOTE: you should interrupt the magical reaction after a few seconds!" +msgstr "" + +msgid "That's not working, try a different combination..." +msgstr "" + +msgid "The incantation can only use ASCII letters." +msgstr "" + +msgid "The incantation requires exactly 4 letters." +msgstr "" + +#, sh-format +msgid "Too soon! You must leave enough time for the magical reaction to start!" +msgstr "" + +msgid "What's a valid 4 letters sequence?" +msgstr "" + +#, sh-format +msgid "usage: $command CCCC\n" + " where CCCC is a sequence of 4 ASCII letters (a-zA-Z)" +msgstr "" diff --git a/missions/intermediate/06_control-C/init.sh b/missions/intermediate/06_control-C/init.sh new file mode 100644 index 00000000..d081f8dd --- /dev/null +++ b/missions/intermediate/06_control-C/init.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +_mission_init() { + # nb of tries to make + echo $((2 + $(RANDOM) % 3)) > "$GSH_TMP/control-C" + rm -f "$GSH_TMP/control-C.codes" + + copy_bin "$MISSION_DIR/Charmiglio.sh" "$GSH_BIN/$(gettext Charmiglio)" +} +_mission_init diff --git a/missions/intermediate/05_control-C/test.sh b/missions/intermediate/06_control-C/test.sh similarity index 74% rename from missions/intermediate/05_control-C/test.sh rename to missions/intermediate/06_control-C/test.sh index f47c342e..7f6d11c1 100644 --- a/missions/intermediate/05_control-C/test.sh +++ b/missions/intermediate/06_control-C/test.sh @@ -6,9 +6,9 @@ do_test() { nb=$1 delay=$2 - for _ in $(seq "$nb") + for c in $(echo "a b c d e f g h i j" | cut -d' ' -f1-$nb) do - eval "$(gettext charmiglio)" 2>/dev/null & + eval "$(gettext Charmiglio)" "$c$c$c$c" 2>/dev/null & PID=$! sleep "$delay" kill -s INT "-$PID" 2> /dev/null @@ -27,8 +27,8 @@ do_test() { do_test 10 0.3 gsh assert check false < "$GSH_TMP/control-C" -do_test 3 3 +do_test 2 4 gsh assert check false < "$GSH_TMP/control-C" -do_test 6 3 +do_test 6 4 gsh assert check true < "$GSH_TMP/control-C" diff --git a/missions/intermediate/index.txt b/missions/intermediate/index.txt index 9bca21db..4a518eb4 100644 --- a/missions/intermediate/index.txt +++ b/missions/intermediate/index.txt @@ -2,4 +2,5 @@ 02_alias_journal 03_tab_spider_lair 04_bg_xeyes -05_control-C +05_background +06_control-C