forked from cryptonotefoundation/cryptonote
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmove-dirs.sh
executable file
·51 lines (45 loc) · 948 Bytes
/
move-dirs.sh
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
47
48
49
50
#!/usr/bin/env bash
if [ ! -d "src/cryptonote" ]; then
mkdir -p src/cryptonote
fi
function move() {
mv src/$1 src/$2
}
dirs=(\
BlockchainExplorer blockchain_explorer \
HTTP http \
Miner miner \
Rpc rpc \
PaymentGate payment_gate \
PaymentGateService payment_gate_service \
SimpleWallet simplewallet \
Serialization serialization \
Daemon daemon \
Logging logging \
P2p p2p \
Platform platform \
System system \
Wallet wallet \
WalletLegacy wallet_legacy \
Common common \
Transfers transfers \
CryptoNoteCore cryptonote/core \
CryptoNoteProtocol cryptonote/protocol \
)
len=${#dirs[@]}
echo $len
for((i=0; i<$len; i+=2)); do
move ${dirs[$i]} ${dirs[$i+1]}
done
function replaceArray() {
cmd=$1
shift
replacements=("$@")
len=${#replacements[@]}
echo $len
for (( i=0; i<$len; i+=2 )); do
$cmd ${replacements[$i]} ${replacements[$i+1]}
done
}
# replaceArray ./replace-types.sh "${Namespaces[@]}"
replaceArray ./replace-types.sh "${dirs[@]}"