Skip to content

Commit

Permalink
change directory in 04_mkdir_chest/clean.sh if the player is in the Hut
Browse files Browse the repository at this point in the history
(because we remove this directory)
  • Loading branch information
phyver committed Jun 28, 2021
1 parent c569cd0 commit b2fec22
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions missions/basic/04_mkdir_chest/clean.sh
Expand Up @@ -5,6 +5,15 @@ case $GSH_LAST_ACTION in
:
;;
*)
case "$(pwd)" in
"$GSH_HOME"/*)
if echo "${PWD#$GSH_HOME/}" | grep -Eq "$(gettext "Hut")|$(gettext "Chest")"
then
cd "$GSH_HOME"
echo "$(gettext "You are back at the initial directory.")"
fi
;;
esac
find "$GSH_HOME" -iname "$(gettext "Hut")" -print0 | xargs -0 rm -rf
find "$GSH_HOME" -iname "$(gettext "Chest")" -print0 | xargs -0 rm -rf
;;
Expand Down
3 changes: 3 additions & 0 deletions missions/basic/04_mkdir_chest/i18n/en.po
Expand Up @@ -26,6 +26,9 @@ msgstr "Hut"
msgid "The $dir_name directory does not exist!"
msgstr "The $dir_name directory does not exist!"

msgid "You are back at the initial directory."
msgstr "You are back at the initial directory."

msgid "You built too many chests in your hut!"
msgstr "You built too many chests in your hut!"

Expand Down
3 changes: 3 additions & 0 deletions missions/basic/04_mkdir_chest/i18n/fr.po
Expand Up @@ -25,6 +25,9 @@ msgstr "Hutte"
msgid "The $dir_name directory does not exist!"
msgstr "Le répertoire $dir_name n'existe pas !"

msgid "You are back at the initial directory."
msgstr "Vous êtes de retour au répertoire initial."

msgid "You built too many chests in your hut!"
msgstr "Vous avez construit trop de coffres dans votre hutte !"

Expand Down
3 changes: 3 additions & 0 deletions missions/basic/04_mkdir_chest/i18n/template.pot
Expand Up @@ -25,6 +25,9 @@ msgstr ""
msgid "The $dir_name directory does not exist!"
msgstr ""

msgid "You are back at the initial directory."
msgstr ""

msgid "You built too many chests in your hut!"
msgstr ""

Expand Down

0 comments on commit b2fec22

Please sign in to comment.