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