OLD | NEW |
| (Empty) |
1 #!/bin/bash | |
2 # | |
3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | |
4 # Use of this source code is governed by a BSD-style license that can be | |
5 # found in the LICENSE file. | |
6 # | |
7 # We use the tusbd USB-over-IP stack from www.incentivespro.com to do | |
8 # test configuration of some hardware. Their userland is | |
9 # free-as-in-beer and we don't have redistribution rights, so we ask | |
10 # people who need it to download and install it on the target machine | |
11 # with this script. | |
12 | |
13 set -e | |
14 set -u | |
15 | |
16 TARGETDIR="$(dirname "$0")" | |
17 | |
18 tmpdir=$(mktemp -d) | |
19 | |
20 cd ${tmpdir} | |
21 wget http://incentivespro.com/usb-server.tar.gz | |
22 | |
23 echo Verifying download... | |
24 | |
25 # NB: sha256sum input must be hexhexhex<SPC><SPC>filename. echo | |
26 # supplies one, we supply the other. | |
27 echo "31b022ce88e77f31f40ea4821d864e6099e70ee451937c978d6979e2ca6c84fe"\ | |
28 " usb-server.tar.gz" \ | |
29 | sha256sum -c | |
30 | |
31 echo Verified | |
32 | |
33 # Don't want to delete temp directory until verification passes (so we can | |
34 # debug) | |
35 trap "rm -rf ${tmpdir}; exit 1" 1 2 13 15 | |
36 | |
37 tar -xzf usb-server.tar.gz | |
38 | |
39 cd usb-server | |
40 sudo cp usbsrv ${TARGETDIR}/usbsrv.real | |
41 sudo cp usbsrvd ${TARGETDIR} | |
42 # Don't need usbsrvd-cl | |
43 | |
44 cd / | |
45 echo USB server installation successful | |
46 rm -rf ${tmpdir} | |
OLD | NEW |