Skip to content

Commit c653787

Browse files
author
Francois Best
committed
Reworked packaging script.
1 parent a615b53 commit c653787

File tree

3 files changed

+37
-50
lines changed

3 files changed

+37
-50
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
*.sublime-workspace
22
*.pyc
33
logs/
4+
build/

res/packaging

Lines changed: 0 additions & 50 deletions
This file was deleted.

res/packaging.command

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/sh
2+
#
3+
# Generate an archive with packaged content for easier delivery.
4+
# The generated archive contains:
5+
# - Source files (MIDI.cpp / MIDI.h)
6+
# - Resources (keywords.txt)
7+
# - Examples for Arduino IDE
8+
# - Installation scripts
9+
10+
cd "`dirname "${0}"`"
11+
12+
root="${PWD}/.."
13+
build="$root/build/MIDI"
14+
15+
echo root $root
16+
echo build $build
17+
18+
# Create a temporary destination folder
19+
mkdir -p "$build"
20+
mkdir -p "$build/examples"
21+
22+
# Copy sources
23+
cd "$root/src/"
24+
cp * "$build/"
25+
26+
# Copy resources
27+
cd "$root/res/"
28+
cp keywords.txt "$build/"
29+
30+
# Copy examples
31+
cd "$root/res/examples/"
32+
cp -r * "$build/examples"
33+
34+
# Generate package
35+
cd "$build/.."
36+
zip -r Arduino_MIDI_Library.zip MIDI

0 commit comments

Comments
 (0)