-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
setup.sh
executable file
·101 lines (80 loc) · 2.19 KB
/
setup.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#!/bin/bash
# If there's a problem, exit with error status
set -e
# install libjson-c-dev if not already installed
dpkg --list | grep libjson-c-dev || error_code=$?
if [[ $error_code -ne 0 ]]
then
sudo apt-get update
sudo apt-get install libjson-c-dev
fi
# download ICU4C binaries if they don't exist
if [[ ! -d gh-cache ]]
then
mkdir -p gh-cache
fi
# ensure that the Python `enum` module is installed
# Github Actions uses Python 3.10 as of Feb 2024
python3 -c 'import pkgutil
if pkgutil.find_loader("enum"):
print("The enum module is already installed")
else:
print("The enum module is not installed yet")
sys.exit(1)
'
error_code=$?
if [[ $error_code -ne 0 ]]
then
sudo apt-get install python3-enum34
fi
function download_71_1() {
if [[ ! -f icu4c-71_1-Ubuntu20.04-x64.tgz ]]
then
wget https://github.com/unicode-org/icu/releases/download/release-71-1/icu4c-71_1-Ubuntu20.04-x64.tgz
fi
}
function download_72_1() {
if [[ ! -f icu4c-72_1-Ubuntu22.04-x64.tgz ]]
then
wget https://github.com/unicode-org/icu/releases/download/release-72-1/icu4c-72_1-Ubuntu22.04-x64.tgz
fi
}
function download_73_1() {
if [[ ! -f icu4c-73_1-Ubuntu22.04-x64.tgz ]]
then
wget https://github.com/unicode-org/icu/releases/download/release-73-1/icu4c-73_1-Ubuntu22.04-x64.tgz
fi
}
function download_74_1() {
if [[ ! -f icu4c-74_1-Ubuntu22.04-x64.tgz ]]
then
wget https://github.com/unicode-org/icu/releases/download/release-74-1/icu4c-74_1-Ubuntu22.04-x64.tgz
fi
}
function download_74_2() {
if [[ ! -f icu4c-74_2-Ubuntu22.04-x64.tgz ]]
then
wget https://github.com/unicode-org/icu/releases/download/release-74-2/icu4c-74_2-Ubuntu22.04-x64.tgz
fi
}
function download_75_1() {
if [[ ! -f icu4c-75_1-Ubuntu22.04-x64.tgz ]]
then
wget https://github.com/unicode-org/icu/releases/download/release-75-1/icu4c-75_1-Ubuntu22.04-x64.tgz
fi
}
function download_76_1() {
if [[ ! -f icu4c-76_1-Ubuntu22.04-x64.tgz ]]
then
wget https://github.com/unicode-org/icu/releases/download/release-76-1/icu4c-76_1-Ubuntu22.04-x64.tgz
fi
}
pushd gh-cache
download_71_1
download_72_1
download_73_1
download_74_1
download_74_2
download_75_1
download_76_1
popd