diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2023-10-29 12:06:09 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2023-10-29 12:06:09 +0100 |
| commit | 5e71fa247d53d628e111fcb2cf0f2b33bf167df7 (patch) | |
| tree | 7d9a0fbbd378a56c5891000638677f04e88cc3fc | |
| parent | 2d4d0f339ab2bfc5c0d74bd18048f96499172e85 (diff) | |
| download | scripts-5e71fa247d53d628e111fcb2cf0f2b33bf167df7.tar.gz scripts-5e71fa247d53d628e111fcb2cf0f2b33bf167df7.zip | |
Added practice
Diffstat (limited to '')
| -rw-r--r-- | Makefile | 1 | ||||
| -rwxr-xr-x | practice | 34 |
2 files changed, 35 insertions, 0 deletions
| @@ -26,6 +26,7 @@ SCRIPTS = addressgrep \ | |||
| 26 | popup-cal12 \ | 26 | popup-cal12 \ |
| 27 | popup-cal3 \ | 27 | popup-cal3 \ |
| 28 | popup-terminal \ | 28 | popup-terminal \ |
| 29 | practice \ | ||
| 29 | secret \ | 30 | secret \ |
| 30 | sel \ | 31 | sel \ |
| 31 | share \ | 32 | share \ |
diff --git a/practice b/practice new file mode 100755 index 0000000..5daa4b5 --- /dev/null +++ b/practice | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # Script based on nissy (see https://nissy.tronto.net) to practice FMC | ||
| 4 | |||
| 5 | # Usage: practice [htr] | ||
| 6 | |||
| 7 | usage() { | ||
| 8 | echo "Usage: practice [htr]" | ||
| 9 | } | ||
| 10 | |||
| 11 | htr() { | ||
| 12 | while true; do | ||
| 13 | scr="$(nissy scramble dr)" | ||
| 14 | echo "$scr" | ||
| 15 | read -r x | ||
| 16 | nissy solve -o htr "$scr" | ||
| 17 | read -r x | ||
| 18 | done | ||
| 19 | } | ||
| 20 | |||
| 21 | if [ -z "$1" ]; then | ||
| 22 | usage | ||
| 23 | exit 1 | ||
| 24 | fi | ||
| 25 | |||
| 26 | case "$1" in | ||
| 27 | htr) | ||
| 28 | htr | ||
| 29 | ;; | ||
| 30 | *) | ||
| 31 | usage | ||
| 32 | exit 1 | ||
| 33 | ;; | ||
| 34 | esac | ||
