Add run script
Add a script to simplify the execution of scrcpy generated in a specific build directory. To run scrcpy generated in builddir, with a video size of 1024: ./run builddir -m 1024
This commit is contained in:
parent
07983d914f
commit
9a07b694f1
1 changed files with 23 additions and 0 deletions
23
run
Executable file
23
run
Executable file
|
@ -0,0 +1,23 @@
|
||||||
|
#!/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_JAR="$BUILDDIR/server/scrcpy-server.jar" "$BUILDDIR/app/scrcpy" "$@"
|
Loading…
Reference in a new issue