forked from linaro-swg/optee_android_manifest
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsync-projects.sh
More file actions
executable file
·46 lines (39 loc) · 987 Bytes
/
sync-projects.sh
File metadata and controls
executable file
·46 lines (39 loc) · 987 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
BASE=$(cd $(dirname $0);pwd)
source ${BASE}/scripts-common/helpers
sync_init_with_depth(){
echo "repo init --depth=1 -g ${REPO_GROUPS} -p linux"
repo init --depth=1 -g ${REPO_GROUPS} -p linux
}
sync_init_without_depth(){
echo "repo init --depth=0 -g ${REPO_GROUPS} -p linux"
repo init --depth=0 -g ${REPO_GROUPS} -p linux
}
sync(){
echo "repo sync -j${CPUS} ${TARGETS[@]}"
repo sync -j${CPUS} ${TARGETS[@]}
}
##########################################################
##########################################################
while [ "$1" != "" ]; do
case $1 in
-d) # overwrite dbg in helpers
echo "Print debug"
dbg=true
;;
-j) # set build parallellism
shift
echo "Num threads: $1"
CPUS=$1
;;
*) # default adds to target list without shift
echo "Adding repo target: $1"
TARGETS=(${TARGETS[@]} $1)
;;
esac
shift
done
sync_init_without_depth
#echo "${TARGETS[@]}"
sync "${TARGETS[@]}"
sync_init_with_depth