forked from ethpandaops/ethereum-package
-
Notifications
You must be signed in to change notification settings - Fork 1
/
rename.sh
executable file
·82 lines (75 loc) · 1.59 KB
/
rename.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/bin/bash
# Helper function to perform replacements
perform_replacements() {
local input_file="$1"
shift
local replacements=("$@")
for ((i = 0; i < ${#replacements[@]}; i+=2)); do
original="${replacements[$i]}"
replacement="${replacements[$i+1]}"
sed -i -- "s/$original/$replacement/g" "$input_file"
done
}
# Check if an input file is provided
if [ $# -eq 0 ]; then
echo "Usage: $0 <input_file>"
exit 1
fi
# Define the input YAML file
input_file="$1"
# Define the replacement pairs as a list
replacements=(
el_client_type
el_type
el_client_image
el_image
el_client_log_level
el_log_level
el_client_volume_size
el_volume_size
cl_client_type
cl_type
cl_client_image
cl_image
cl_client_volume_size
cl_volume_size
cl_client_log_level
cl_log_level
beacon_extra_params
cl_extra_params
beacon_extra_labels
cl_extra_labels
bn_min_cpu
cl_min_cpu
bn_max_cpu
cl_max_cpu
bn_min_mem
cl_min_mem
bn_max_mem
cl_max_mem
use_separate_validator_client
use_separate_vc
validator_client_type
vc_type
validator_tolerations
vc_tolerations
validator_client_image
vc_image
validator_extra_params
vc_extra_params
validator_extra_labels
vc_extra_labels
v_min_cpu
vc_min_cpu
v_max_cpu
vc_max_cpu
v_min_mem
vc_min_mem
v_max_mem
vc_max_mem
global_client_log_level
global_log_level
)
# Perform replacements
perform_replacements "$input_file" "${replacements[@]}"
echo "Replacements completed."