1*af2ec015STomasz Sapeta#!/bin/bash 2*af2ec015STomasz Sapeta# Copyright (c) Meta Platforms, Inc. and affiliates. 3*af2ec015STomasz Sapeta# 4*af2ec015STomasz Sapeta# This source code is licensed under the MIT license found in the 5*af2ec015STomasz Sapeta# LICENSE file in the root directory of this source tree. 6*af2ec015STomasz Sapeta 7*af2ec015STomasz Sapeta# Set terminal title 8*af2ec015STomasz Sapetaecho -en "\\033]0;Metro\\a" 9*af2ec015STomasz Sapetaclear 10*af2ec015STomasz Sapeta 11*af2ec015STomasz SapetaTHIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd) 12*af2ec015STomasz Sapeta 13*af2ec015STomasz Sapetaexport PODS_ROOT="$THIS_DIR/../../../ios/Pods" 14*af2ec015STomasz SapetaWITH_ENVIRONMENT="$THIS_DIR/xcode/with-environment.sh" 15*af2ec015STomasz Sapetasource $WITH_ENVIRONMENT 16*af2ec015STomasz Sapeta 17*af2ec015STomasz Sapeta# export packager environment variables 18*af2ec015STomasz Sapetasource "$THIS_DIR/.packager.env" 19*af2ec015STomasz Sapeta 20*af2ec015STomasz Sapetaif [ -n "${RCT_PACKAGER_LOGS_DIR}" ] ; then 21*af2ec015STomasz Sapeta echo "Writing logs to $RCT_PACKAGER_LOGS_DIR" 22*af2ec015STomasz Sapeta # shellcheck source=/dev/null 23*af2ec015STomasz Sapeta RCT_PACKAGER_LOG_PATH="$RCT_PACKAGER_LOGS_DIR/metro.log" \ 24*af2ec015STomasz Sapeta . "$THIS_DIR/packager.sh" \ 25*af2ec015STomasz Sapeta > "$RCT_PACKAGER_LOGS_DIR/packager.stdout.log" \ 26*af2ec015STomasz Sapeta 2> "$RCT_PACKAGER_LOGS_DIR/packager.stderr.log" 27*af2ec015STomasz Sapetaelse 28*af2ec015STomasz Sapeta # shellcheck source=/dev/null 29*af2ec015STomasz Sapeta . "$THIS_DIR/packager.sh" 30*af2ec015STomasz Sapetafi 31*af2ec015STomasz Sapetaif [[ -z "$CI" ]]; then 32*af2ec015STomasz Sapeta echo "Process terminated. Press <enter> to close the window" 33*af2ec015STomasz Sapeta read -r 34*af2ec015STomasz Sapetafi 35