Игра Маджонг | Mahjong game
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ген 526B

1234567891011121314151617181920212223242526272829
  1. #!/bin/bash
  2. # Создать файл JavaScript с набором раскладок в формате Base64.
  3. function gen
  4. {
  5. fileName=$1
  6. target=$2
  7. echo -n "'$fileName' : '" >> $target
  8. base64 $fileName | tr -d \\n >> $target
  9. echo -e "',\n" >> $target
  10. }
  11. function genLayouts
  12. {
  13. target=$1
  14. echo -e "function RR() { return {\n" > $target
  15. layouts=$(ls *.layout)
  16. for layout in $layouts;
  17. do
  18. gen $layout $target
  19. done
  20. echo "}; }" >> $target
  21. }
  22. genLayouts "../2019-09-19.js"