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