forked from pavel-a/usb-relay-hid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make_release_linux.sh
55 lines (42 loc) · 966 Bytes
/
make_release_linux.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
# Make release, Linux binaries
# Run this after build
# TODO detect x86/x64 build mode ??
# Release tree:
# bin-Linux-x86/
# bin-Linux-x64/
# doc/
# usb_relay_device_lib_devel/
# (nothing for linux?)
# Test/
set -e
export REL=_rel
mkdirr() {
if [ ! -d $1 ]; then mkdir --parents $1 ; fi
}
mkdirr $REL
copy_x86() {
mkdirr $1
cp commandline/makemake/hidusb-relay-cmd $1
cp commandline/makemake/usb_relay_device.so $1
}
copy_x64() {
mkdirr $1
cp commandline/makemake/hidusb-relay-cmd $1
cp commandline/makemake/usb_relay_device.so $1
}
copy_x86 $REL/bin-Linux-x86
# copy_x64 $REL/bin-Linux-x64
copy_noarch() {
mkdirr $REL/doc
cp doc/Readme_USB-Relay-DLL.md $REL/doc/
cp commandline/README-hidusb-relay-cmd.txt $REL/doc/
mkdirr $REL/usb_relay_device_lib_devel
cp lib/usb_relay_device.h $REL/usb_relay_device_lib_devel
}
copy_noarch
# Tests ...
mkdirr $REL/Test
cp Test/relay1-pulse.sh $REL/Test
cp Test/[Tt]est*.py $REL/Test
echo "Done"