File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ function realpath {
4
+ local r=$1 ; local t=$( readlink $r )
5
+ while [ $t ]; do
6
+ r=$( cd $( dirname $r ) && cd $( dirname $t ) && pwd -P) /$( basename $t )
7
+ t=$( readlink $r )
8
+ done
9
+ echo $r
10
+ }
11
+
12
+ MPLAY_HOME=$( dirname $( realpath " $0 " ) )
13
+
14
+ function usage()
15
+ {
16
+ echo " Mplay [-h|--help] [--device=midi-device] [--gui] midi-file"
17
+ }
18
+
19
+ device=" scva"
20
+ interface=" tui"
21
+ file=" "
22
+
23
+ while : ; do
24
+ case $1 in
25
+ -h | -\? | --help)
26
+ usage
27
+ exit
28
+ ;;
29
+ --device=?* )
30
+ device=${1#* =}
31
+ ;;
32
+ --gui)
33
+ interface=" Mplay"
34
+ ;;
35
+ -* )
36
+ usage
37
+ exit 1
38
+ ;;
39
+ * )
40
+ file=" $@ "
41
+ break
42
+ ;;
43
+ esac
44
+ shift
45
+ done
46
+
47
+ if [ " $file " == " " ]; then
48
+ usage
49
+ exit 1
50
+ fi
51
+
52
+ env MIDI_DEVICE=${device} julia ${MPLAY_HOME} /${interface} .jl " ${file} "
You can’t perform that action at this time.
0 commit comments