Advertisement
Guest User

Untitled

a guest
Feb 11th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.65 KB | None | 0 0
  1. 1 #!/bin/bash
  2. 2
  3. 3
  4. 4 #use values below for TRUE Hybrid Project
  5. 5 export FT_COMEDIA=44143
  6. 6 export FT_TEATRO35=44144
  7. 7 export FT_CHAL_WRAP=44147
  8. 8 export FT_CHAL_HISI=44145
  9. 9 export FT_CHAL_GEN=44148
  10. 10 export FT_HLS=44153
  11. 11 export FT_DASH=44158
  12. 12
  13. 13
  14. 14 #use values below for Master FT
  15. 15 #export FT_COMEDIA=24981
  16. 16 #export FT_TEATRO35=18436
  17. 17 #export FT_CHAL_WRAP=43737
  18. 18 #export FT_CHAL_HISI=27459
  19. 19 #export FT_CHAL_GEN=19553
  20. 20 #export FT_HLS=32120
  21. 21 #export FT_DASH=36936
  22. 22
  23. 23 iw_ag_pull_ft() {
  24. 24 git pull ssh://`echo $1`@gerrit.iwedia.com:29418/`echo $2` `git ls-remote origin| grep /$3/ | awk '{print $2}' | sed 's/\// /g' | sort -n -k5 | tail -n 1 | sed 's/ /\//g'`
  25. 25 return 0
  26. 26 }
  27. 27
  28. 28
  29. 29
  30. 30 get_hooks() {
  31. 31 gitdir=$(git rev-parse --git-dir); scp -p -P 29418 $1@gerrit.iwedia.com:hooks/commit-msg ${gitdir}/hooks/
  32. 32 }
  33. 33
  34. 34 main() {
  35. 35 set -eu
  36. 36
  37. 37
  38. 38 if [ -z $1 ]; then
  39. 39 echo "ERROR!!!! usage: get_comedia.sh gerrit_username"
  40. 40 return 1
  41. 41 fi
  42. 42
  43. 43 local middleware_root=`pwd`/middleware
  44. 44 local teatro35_root=$middleware_root/teatro35
  45. 45 local chal_root_wrapper=$middleware_root/chal/tdal/src
  46. 46 local chal_root_hisi=$middleware_root/chal/tdal/src/plugins/tdal_hisi
  47. 47 local chal_root_generic=$middleware_root/chal/tdal/src/plugins/tdal_generic
  48. 48 local libhls_root=$middleware_root/chal-common/libhls
  49. 49 local libdash_root=$middleware_root/chal-common/libdash
  50. 50
  51. 51 if [ ! -d $middleware_root ]; then
  52. 52 git clone ssh://$1@gerrit.iwedia.com:29418/comedia3 $middleware_root
  53. 53 pushd $middleware_root
  54. 54 get_hooks $1
  55. 55 iw_ag_pull_ft $1 "comedia3" $FT_COMEDIA
  56. 56 popd
  57. 57 fi
  58. 58
  59. 59 if [ ! -d $teatro35_root ]; then
  60. 60 git clone ssh://$1@gerrit.iwedia.com:29418/teatro35 $teatro35_root
  61. 61 pushd $teatro35_root
  62. 62 get_hooks $1
  63. 63 iw_ag_pull_ft $1 "teatro35" $FT_TEATRO35
  64. 64 popd
  65. 65 fi
  66. 66
  67. 67 if [ ! -d $chal_root_wrapper ]; then
  68. 68 git clone ssh://$1@gerrit.iwedia.com:29418/chal-android-wrapper $chal_root_wrapper
  69. 69 pushd $chal_root_wrapper
  70. 70 get_hooks $1
  71. 71 iw_ag_pull_ft $1 "chal-android-wrapper" $FT_CHAL_WRAP
  72. 72 popd
  73. 73 fi
  74. 74
  75. 75 if [ ! -d $chal_root_hisi ]; then
  76. 76 git clone ssh://$1@gerrit.iwedia.com:29418/chal-andorid-hisilicon $chal_root_hisi
  77. 77 pushd $chal_root_hisi
  78. 78 get_hooks $1
  79. 79 iw_ag_pull_ft $1 "chal-andorid-hisilicon" $FT_CHAL_HISI
  80. 80 popd
  81. 81 fi
  82. 82
  83. 83 if [ ! -d $chal_root_generic ]; then
  84. 84 git clone ssh://$1@gerrit.iwedia.com:29418/chal-android-generic $chal_root_generic
  85. 85 pushd $chal_root_generic
  86. 86 get_hooks $1
  87. 87 iw_ag_pull_ft $1 "chal-android-generic" $FT_CHAL_GEN
  88. 88 popd
  89. 89 fi
  90. 90
  91. 91 if [ ! -d $libhls_root ]; then
  92. 92 git clone ssh://$1@gerrit.iwedia.com:29418/libhls $libhls_root
  93. 93 pushd $libhls_root
  94. 94 get_hooks $1
  95. 95 iw_ag_pull_ft $1 "libhls" $FT_HLS
  96. 96 popd
  97. 97 fi
  98. 98
  99. 99 if [ ! -d $libdash_root ]; then
  100. 100 git clone ssh://$1@gerrit.iwedia.com:29418/libdash $libdash_root
  101. 101 pushd $libdash_root
  102. 102 get_hooks $1
  103. 103 iw_ag_pull_ft $1 "libdash" $FT_DASH
  104. 104 popd
  105. 105 fi
  106. 106
  107. 107 }
  108. 108
  109. 109 main "$1"
  110. 110
  111. 111 exit $?
  112. 112
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement