blob: 5082010ebb237be5308407957389943467e8bada (
plain)
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
|
#!/bin/bash
export BASE=$(cd $(dirname $0);pwd)
#source ${BASE}/scripts-common/sync-common.sh
sync_init_with_depth(){
while ! repo init --depth=1; do
sleep 30
done
}
sync_init_without_depth(){
while ! repo init --depth=0; do
sleep 30
done
}
sync(){
#Syncronize and check out
CPUS=$(grep processor /proc/cpuinfo |wc -l)
while ! repo sync -j ${CPUS} $@; do
sleep 30
done
}
sync_init_without_depth
sync "$@"
sync_init_with_depth
|