24 lines
579 B
Bash
24 lines
579 B
Bash
#! /bin/bash
|
|
|
|
set -e
|
|
|
|
cd "$(dirname "$BASH_SOURCE")"
|
|
if ! [ -f ./c2m.py ]; then
|
|
curl -L https://github.com/Miserlou/chords2midi/raw/master/chords2midi/c2m.py > ./c2m.py
|
|
fi
|
|
if ! [ -f ./req.txt ]; then
|
|
curl -L https://github.com/Miserlou/chords2midi/raw/master/requirements.txt > ./req.txt
|
|
pip2.7 install -r ./req.txt
|
|
fi
|
|
if ! [ -f ./chords2midi.py ]; then
|
|
echo "#! $(which python2)" > ./chords2midi.py
|
|
cat ./c2m.py >> ./chords2midi.py
|
|
fi
|
|
chmod +x ./chords2midi.py
|
|
|
|
if ! which timidity; then
|
|
brew install timidity
|
|
fi
|
|
echo ./chords* ARGUMENTS
|
|
echo timidity ./*.mid
|