scrcpy/run
Romain Vimont 089378926b Rename SCRCPY_SERVER_JAR to SCRCPY_SERVER_PATH
The server is currently a JAR, but it may ba an APK or a DEX, so the
variable name should not contain the type.

Rename the environment variable, the Meson options and the C
definitions.
2018-02-16 15:36:25 +01:00

24 lines
517 B
Bash
Executable File

#!/bin/bash
# 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
SCRCPY_SERVER_PATH="$BUILDDIR/server/scrcpy-server.jar" "$BUILDDIR/app/scrcpy" "$@"