Files
OpenCellular/extra/tigertool/make_pkg.sh
Nick Sanders 395fce39e2 tigertail: tigertool command line api
This tool allows an easy commandline interface to set the
USB-C mux position, as well as init and reboot.

BRANCH=None
BUG=b:35849284
TEST=flash, control tigertail successfully

Change-Id: I8d60c215fee04de158c22edca5377c3c6cd48cf0
Reviewed-on: https://chromium-review.googlesource.com/493617
Commit-Ready: Nick Sanders <nsanders@chromium.org>
Tested-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
2017-05-16 00:09:24 -07:00

29 lines
780 B
Bash
Executable File

#!/bin/bash
# Copyright 2017 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Make sure we are in the correct dir.
cd "$( dirname "${BASH_SOURCE[0]}" )" || exit
# Clean and previous cruft.
rm -rf build
DEST=build/tigertool
DATE=$(date +"%Y%m%d")
mkdir -p "${DEST}"
cp ../usb_serial/console.py "${DEST}"
cp ../../../../../chroot/usr/bin/dfu-util "${DEST}"
cp flash_dfu.sh "${DEST}"
cp tigertool.py "${DEST}"
cp -r ecusb "${DEST}"
cp -r ../../../../../chroot/usr/lib64/python2.7/site-packages/usb "${DEST}"
find "${DEST}" -name "*.py[co]" -delete
cp -r ../usb_serial "${DEST}"
(cd build; tar -czf tigertool_${DATE}.tgz tigertool)
echo "Done packaging tigertool_${DATE}.tgz"