mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-08-26 22:10:17 +08:00
Improve flutter run script
This commit is contained in:
@ -4,14 +4,14 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
FILTER="$1"
|
FILTER="$1"
|
||||||
|
|
||||||
DEVICE=$(./flutterw devices --device-timeout=1 --machine | jq -r '.[].name' | fzf -1 -q "$FILTER")
|
set -eu
|
||||||
|
|
||||||
|
DEVICE=$(./flutterw devices --device-timeout=1 --machine | jq -r '.[] | .nn=.id+" "+.name | .nn' | fzf -1 -q "$FILTER")
|
||||||
DEVICE_INFO=$(./flutterw devices --machine | jq -r ".[] | select(.name==\"$DEVICE\")")
|
DEVICE_INFO=$(./flutterw devices --machine | jq -r ".[] | select(.name==\"$DEVICE\")")
|
||||||
DEVICE_ID=$(echo "$DEVICE_INFO" | jq -r .id)
|
DEVICE_ID=$(echo "$DEVICE_INFO" | jq -r .id)
|
||||||
DEVICE_TARGET=$(echo "$DEVICE_INFO" | jq -r .targetPlatform)
|
DEVICE_TARGET=$(echo "$DEVICE_INFO" | jq -r .targetPlatform)
|
||||||
|
Reference in New Issue
Block a user