setup_quickstart_framework.sh 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. # Copyright 2020 Google LLC
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. set -ex
  15. REPO=`pwd`
  16. git clone https://github.com/firebase/quickstart-ios.git
  17. cd quickstart-ios/"${SAMPLE}"
  18. chmod +x ../scripts/info_script.rb
  19. ruby ../scripts/info_script.rb "${SAMPLE}"
  20. mkdir -p Firebase/
  21. # Create non Firebase Frameworks and move to Firebase/ dir.
  22. if [[ ! -z "$NON_FIREBASE_SDKS" ]]; then
  23. REPO="${REPO}" NON_FIREBASE_SDKS="${NON_FIREBASE_SDKS}" "${REPO}"/scripts/build_non_firebase_sdks.sh
  24. fi
  25. mv "${HOME}"/ios_frameworks/Firebase/Firebase.h Firebase/
  26. mv "${HOME}"/ios_frameworks/Firebase/module.modulemap Firebase/
  27. for file in "$@"
  28. do
  29. # Not override framework if a framework with the same name was moved early..
  30. mv -n ${file} Firebase/
  31. done
  32. ../scripts/add_framework_script.rb "${SAMPLE}" "${TARGET}" Firebase