status-mobile/scripts/run-metro.sh

9 lines
288 B
Bash
Raw Normal View History

#!/usr/bin/env bash
if pgrep -f "react-native start --port=${RCT_METRO_PORT:-8081}" > /dev/null; then
echo "Info: metro is already running in another terminal"
else
echo "Info: starting a new metro terminal"
react-native start --port=${RCT_METRO_PORT:-8081} --reset-cache
fi