ADTast-experimental
Last change
on this file since 985b624 was
7c6b262,
checked in by Thierry Delisle <tdelisle@…>, 4 years ago
|
Added option to limit bandwith during the distribution phase of th build (when using distcc)
|
-
Property mode set to
100755
|
File size:
787 bytes
|
Rev | Line | |
---|
[6716d78] | 1 | #!/bin/bash |
---|
| 2 | |
---|
| 3 | hash="$1" |
---|
[7c6b262] | 4 | bwlim="$2" |
---|
[6716d78] | 5 | valid=$(distcc -j 2> /dev/null) |
---|
| 6 | # if test "${valid}" != 0 |
---|
| 7 | |
---|
| 8 | hosts_long=$(distcc --show-hosts 2> /dev/null) |
---|
| 9 | hosts="localhost" |
---|
| 10 | while read -r host; do |
---|
| 11 | if [[ "${host}" =~ @?([A-Za-z0-9.\-]+)/.* ]] |
---|
| 12 | then |
---|
| 13 | hosts="${BASH_REMATCH[1]} ${hosts}" |
---|
| 14 | else |
---|
| 15 | >&2 echo "Could not parse host '${host}' (must use ssh hosts)" |
---|
| 16 | exit 1 |
---|
| 17 | fi |
---|
| 18 | done <<< "${hosts_long}" |
---|
| 19 | |
---|
| 20 | # echo "Copying to machines : ${hosts} (hash=${hash})" |
---|
| 21 | |
---|
[c680a4b] | 22 | files="../../../driver/cfa ../../../driver/cfa-cpp ../../../driver/cc1 ../../../driver/as defines.hfa $(find . -name '*.c*' | tr '\n' ' ')" |
---|
[6716d78] | 23 | # echo "Files ${files}" |
---|
| 24 | |
---|
| 25 | function push() { |
---|
| 26 | ssh ${host} "mkdir -p ~/.cfadistcc/${hash}/" |
---|
[7c6b262] | 27 | rsync --bwlimit=${bwlim} -a ${dV} ${files} ${host}:~/.cfadistcc/${hash}/. |
---|
[6716d78] | 28 | } |
---|
| 29 | |
---|
| 30 | for host in ${hosts} |
---|
| 31 | do |
---|
| 32 | push & |
---|
| 33 | done |
---|
| 34 | |
---|
| 35 | wait |
---|
Note: See
TracBrowser
for help on using the repository browser.