oh-my-git/levels/contrib/template

32 lines
964 B
Text
Raw Normal View History

2020-10-12 20:03:38 +02:00
[description]
This text will be shown when the level starts.
It describes the task or puzzle the player can solve.
[congrats]
This text will be shown after the player has solved the level.
Can contain additional information, or bonus exercises.
[setup]
# Bash commands that set up the initial state of the level. An initial
# `git init` is always done automatically. The default branch is called `main`.
echo You > people_who_are_awesome
git add .
git commit -m "Initial commit"
[win]
# Bash commands that check whether the level is solved. Write these as if you're
# writing the body of a Bash function. Make the function return 0 if it's
# solved, and a non-zero value otherwise. You can use `return`, and also, Bash
# functions return the exit code of the last statement, which sometimes allows
# very succinct checks.
# Check whether the file has at least two lines in the latest commit:
test "$(git show HEAD:people_who_are_awesome | wc -l)" -ge 2