FreeCalypso > hg > freecalypso-tools
comparison ringtools/fc-meltest-pwt @ 880:5b68ba735e98
fc-meltest-pwt: allow optional play volume argument
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Sat, 02 Apr 2022 21:52:29 +0000 |
| parents | 9998c015a687 |
| children |
comparison
equal
deleted
inserted
replaced
| 879:702470859ebd | 880:5b68ba735e98 |
|---|---|
| 1 #!/bin/sh | 1 #!/bin/sh |
| 2 | 2 |
| 3 if [ $# != 1 ] | 3 if [ $# -lt 1 -o $# -gt 2 ] |
| 4 then | 4 then |
| 5 echo "usage: $0 pwt_melody_file" 1>&2 | 5 echo "usage: $0 pwt_melody_file [volume]" 1>&2 |
| 6 exit 1 | 6 exit 1 |
| 7 fi | 7 fi |
| 8 | 8 |
| 9 tmpfile=/tmp/fc-test-melody.bz | 9 tmpfile=/tmp/fc-test-melody.bz |
| 10 | 10 |
| 11 if [ -n "$2" ] | |
| 12 then | |
| 13 volume="$2" | |
| 14 else | |
| 15 volume=64 | |
| 16 fi | |
| 17 | |
| 11 set -ex | 18 set -ex |
| 12 | 19 |
| 13 fc-pwt-comp "$1" $tmpfile | 20 fc-pwt-comp "$1" $tmpfile |
| 14 fc-fsio upload-file $tmpfile /buz/test.bz | 21 fc-fsio upload-file $tmpfile /buz/test.bz |
| 15 fc-shell 'at@buz="/buz/test.bz"' | 22 fc-shell 'at@buz="/buz/test.bz"'",$volume" |
