dev
sh 37 lines 930 Bytes
Raw
1 #!/bin/bash
2 set -x -e
3
4 pids=()
5
6 for cwcoin in cw_{core,evm,monero,bitcoin,nano,bitcoin_cash,solana,tron,wownero,zano,decred,dogecoin,zcash}
7 do
8 if [[ "x$1" == "xasync" ]];
9 then
10 env PUB_CACHE=$HOME/.cache/pub-cache-$cwcoin bash -c "cd $cwcoin; flutter pub get; dart run build_runner build --delete-conflicting-outputs; cd .." &
11 pids+=($!)
12 else
13 cd $cwcoin; flutter pub get; dart run build_runner build --delete-conflicting-outputs; cd ..
14 fi
15 done
16 for cwcoin in cw_mweb;
17 do
18 if [[ "x$1" == "xasync" ]];
19 then
20 bash -c "cd $cwcoin; flutter pub get; cd .." &
21 pids+=($!)
22 else
23 cd $cwcoin; flutter pub get; cd ..
24 fi
25 done
26
27 for pid in "${pids[@]}"; do
28 if ! wait "$pid"; then
29 ec=$?
30 echo "Error: Failed to generate models: $ec"
31 exit $ec
32 fi
33 done
34
35 flutter pub get
36 dart run build_runner build --delete-conflicting-outputs
37 flutter pub get