2020-09-15 19:54:00 +08:00
|
|
|
#!/usr/bin/env bash
|
2018-02-15 01:31:42 +08:00
|
|
|
# Run scrcpy generated in the specified BUILDDIR.
|
|
|
|
#
|
|
|
|
# This provides the same feature as "ninja run", except that it is possible to
|
|
|
|
# pass arguments to scrcpy.
|
|
|
|
#
|
|
|
|
# Syntax: ./run BUILDDIR <scrcpy options ...>
|
|
|
|
if [[ $# = 0 ]]
|
|
|
|
then
|
|
|
|
echo "Syntax: $0 BUILDDIR <scrcpy options>" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
BUILDDIR="$1"
|
|
|
|
shift
|
|
|
|
|
|
|
|
if [[ ! -d "$BUILDDIR" ]]
|
|
|
|
then
|
|
|
|
echo "The build dir \"$BUILDDIR\" does not exist." >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2021-10-23 00:51:20 +08:00
|
|
|
SCRCPY_ICON_PATH="data/icon.png" \
|
|
|
|
SCRCPY_SERVER_PATH="$BUILDDIR/server/scrcpy-server" \
|
|
|
|
"$BUILDDIR/app/scrcpy" "$@"
|