android: fix adb reverse command in case of non-default port

This commit is contained in:
Saúl Ibarra Corretgé 2020-08-10 11:51:33 +02:00 committed by Saúl Ibarra Corretgé
parent 5b1f852783
commit eabcc078ef
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOUR
export RCT_METRO_PORT="${RCT_METRO_PORT:=8081}"
echo "export RCT_METRO_PORT=${RCT_METRO_PORT}" > "${THIS_DIR}/../../node_modules/react-native/scripts/.packager.env"
adb reverse tcp:8081 tcp:8081
adb reverse tcp:$RCT_METRO_PORT tcp:$RCT_METRO_PORT
if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then
if ! curl -s "http://localhost:${RCT_METRO_PORT}/status" | grep -q "packager-status:running" ; then