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

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