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

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