#!/usr/bin/env bash
set -euo pipefail
task_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
case "$PWD" in
  "$task_root"/build/*/ios)
    if [[ "${1:-}" == install && ! -f Podfile.lock ]]; then
      cp "$task_root/scripts/ios/Podfile.lock" Podfile.lock
    fi
    ;;
esac
exec bundle exec pod "$@"
