Application Android et IOS pour l'amicale des élèves
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

install.sh 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #!/bin/bash
  2. base_dir=$(pwd)
  3. function ios_install {
  4. cd "$base_dir"/ios && pod install
  5. }
  6. function android_install {
  7. echo "Creating debug android keystore..."
  8. cd "$base_dir"/android/app && keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000
  9. echo -e "Done\n"
  10. cd ..
  11. echo "Creating gradle.properties file..."
  12. echo "# Project-wide Gradle settings.
  13. # IDE (e.g. Android Studio) users:
  14. # Gradle settings configured through the IDE *will override*
  15. # any settings specified in this file.
  16. # For more details on how to configure your build environment visit
  17. # http://www.gradle.org/docs/current/userguide/build_environment.html
  18. # Specifies the JVM arguments used for the daemon process.
  19. # The setting is particularly useful for tweaking memory settings.
  20. # Default value: -Xmx10248m -XX:MaxPermSize=256m
  21. # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
  22. # When configured, Gradle will run in incubating parallel mode.
  23. # This option should only be used with decoupled projects. More details, visit
  24. # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
  25. # org.gradle.parallel=true
  26. # AndroidX package structure to make it clearer which packages are bundled with the
  27. # Android operating system, and which are packaged with your app's APK
  28. # https://developer.android.com/topic/libraries/support-library/androidx-rn
  29. android.useAndroidX=true
  30. # Automatically convert third-party libraries to use AndroidX
  31. android.enableJetifier=true
  32. # Version of flipper SDK to use with React Native
  33. FLIPPER_VERSION=0.37.0
  34. # This file is not included in git because it may contain secrets concerning the release key.
  35. # To get those secrets, please contact the author at vergnet@etud.insa-toulouse.fr
  36. " > gradle.properties
  37. echo -e "Done\n"
  38. }
  39. function node_install {
  40. cd "$base_dir" || exit 1
  41. ./clear-node-cache.sh
  42. }
  43. if [[ $1 == "--android" ]]
  44. then
  45. echo "Installing for Android only"
  46. node_install
  47. android_install
  48. elif [[ $1 == "--ios" ]]
  49. then
  50. echo "Installing for iOS only"
  51. node_install
  52. ios_install
  53. elif [[ $1 == "--all" ]]
  54. then
  55. echo "Installing for Android and iOS"
  56. node_install
  57. android_install
  58. ios_install
  59. else
  60. echo "Usage: ./install.sh [mode]"
  61. echo " [mode]: --android Installs only Android dependencies"
  62. echo " [mode]: --ios Installs only iOS dependencies"
  63. echo " [mode]: --all Installs Android and iOS dependencies"
  64. fi
  65. exit