mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-07-29 12:19:15 +00:00
Extract args processing in deps scripts
Extract the code that processes arguments into a function. This will make it optional, so the script that only downloads the official ADB binaries will not use arguments. PR #5515 <https://github.com/Genymobile/scrcpy/pull/5515>
This commit is contained in:
parent
cf0098abf0
commit
6a81fc438b
5 changed files with 23 additions and 17 deletions
|
@ -3,6 +3,7 @@ set -ex
|
|||
DEPS_DIR=$(dirname ${BASH_SOURCE[0]})
|
||||
cd "$DEPS_DIR"
|
||||
. common
|
||||
process_args "$@"
|
||||
|
||||
VERSION=35.0.2
|
||||
FILENAME=platform-tools_r$VERSION-win.zip
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
# This file is intended to be sourced by other scripts, not executed
|
||||
|
||||
process_args() {
|
||||
if [[ $# != 1 ]]
|
||||
then
|
||||
# <host>: win32 or win64
|
||||
|
@ -20,6 +21,7 @@ else
|
|||
echo "Unsupported host: $HOST" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
DEPS_DIR=$(dirname ${BASH_SOURCE[0]})
|
||||
cd "$DEPS_DIR"
|
||||
|
|
|
@ -3,6 +3,7 @@ set -ex
|
|||
DEPS_DIR=$(dirname ${BASH_SOURCE[0]})
|
||||
cd "$DEPS_DIR"
|
||||
. common
|
||||
process_args "$@"
|
||||
|
||||
VERSION=7.1
|
||||
FILENAME=ffmpeg-$VERSION.tar.xz
|
||||
|
|
|
@ -3,6 +3,7 @@ set -ex
|
|||
DEPS_DIR=$(dirname ${BASH_SOURCE[0]})
|
||||
cd "$DEPS_DIR"
|
||||
. common
|
||||
process_args "$@"
|
||||
|
||||
VERSION=1.0.27
|
||||
FILENAME=libusb-$VERSION.tar.gz
|
||||
|
|
|
@ -3,6 +3,7 @@ set -ex
|
|||
DEPS_DIR=$(dirname ${BASH_SOURCE[0]})
|
||||
cd "$DEPS_DIR"
|
||||
. common
|
||||
process_args "$@"
|
||||
|
||||
VERSION=2.30.9
|
||||
FILENAME=SDL-$VERSION.tar.gz
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue