42 lines
		
	
	
		
			804 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
			
		
		
	
	
			42 lines
		
	
	
		
			804 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
| #!/bin/bash
 | |
| # Use this script to install the library directy from the git clone.
 | |
| 
 | |
| 
 | |
| if [[ -d /Applications/Arduino.app ]]
 | |
| then
 | |
|     
 | |
|     # Define locations
 | |
|     
 | |
|     lib_path=/Applications/Arduino.app/Contents/Resources/Java/libraries/MIDI
 | |
|     
 | |
|     if [[ -d $lib_path ]]
 | |
|     then
 | |
|         # Remove old lib
 | |
|         rm -rf $lib_path
 | |
|     fi
 | |
|     
 | |
|     # Create folder
 | |
|     mkdir $lib_path
 | |
|     
 | |
|     # Copy sources
 | |
|     cp ../src/MIDI.cpp  $lib_path
 | |
|     cp ../src/MIDI.h    $lib_path
 | |
|     cp ../src/midi_*    $lib_path
 | |
|     
 | |
|     # Copy resources
 | |
|     cp ../res/keywords.txt $lib_path
 | |
|     
 | |
|     # Copy examples
 | |
|     mkdir $lib_path/examples
 | |
|     
 | |
|     cp -r examples/* $lib_path/examples
 | |
|     
 | |
|     # Copy doc
 | |
|     mkdir $lib_path/doc
 | |
|     
 | |
|     cp -r ../doc/* $lib_path/doc
 | |
|     
 | |
| else
 | |
|     echo "Arduino application not found."
 | |
| fi
 |