2
2
3
3
# # Set environment properties
4
4
5
- SWIFTBOX_VERSION=" 0.13.2 "
5
+ SWIFTBOX_VERSION=" 0.13.3 "
6
6
SWIFT_DOWNLOAD_SITE=" https://download.swift.org"
7
7
8
8
if [ ` id -u` = 0 ]
@@ -127,18 +127,33 @@ init-env() {
127
127
case $SYSTEM_NAME in
128
128
ubuntu)
129
129
$SUDO_FLAG apt-get update
130
- $SUDO_FLAG apt-get install gnupg git libpython2.7 binutils tzdata libxml2 clang libicu-dev pkg-config zlib1g-dev libedit2 libsqlite3-0 libz3-dev -y
130
+ case $SYSTEM_VERSION in
131
+ 16.04 | 18.04 | 20.04 | 22.04) ;;
132
+ * )
133
+ echo " It seems you're using an unsupported Ubuntu version. Dependency installation might fail."
134
+ ;;
135
+ esac
136
+ COMMON_DEPS=" binutils git gnupg2 libc6-dev libedit2 libsqlite3-0 pkg-config tzdata zlib1g-dev"
131
137
case $SYSTEM_VERSION in
132
138
16.04 | 18.04)
133
- $SUDO_FLAG apt-get install libgcc-5-dev libstdc++-5-dev -y
139
+ FOUNDATION_DEPS=" libcurl4 libxml2 libicu-dev"
140
+ GCC_DEPS=" libgcc-5-dev libstdc++-5-dev"
141
+ PYTHON_DEP=" libpython2.7"
134
142
;;
135
143
20.04)
136
- $SUDO_FLAG apt-get install libgcc-9-dev libstdc++-9-dev -y
144
+ FOUNDATION_DEPS=" libcurl4 libxml2"
145
+ GCC_DEPS=" libgcc-9-dev libstdc++-9-dev"
146
+ PYTHON_DEP=" libpython2.7"
147
+ OTHER_DEPS=" uuid-dev"
137
148
;;
138
- * )
139
- echo " You should install the corresponding version of libgcc-dev and libstdc++-dev manually to enable full functionalities of Swift."
149
+ 22.04 | * )
150
+ FOUNDATION_DEPS=" libcurl4-openssl-dev libxml2-dev"
151
+ GCC_DEPS=" libgcc-9-dev libstdc++-9-dev"
152
+ PYTHON_DEP=" libpython3.8"
153
+ OTHER_DEPS=" unzip"
140
154
;;
141
155
esac
156
+ $SUDO_FLAG apt-get install $COMMON_DEPS $FOUNDATION_DEPS $GCC_DEPS $PYTHON_DEP $OTHER_DEPS -y
142
157
;;
143
158
centos)
144
159
$SUDO_FLAG yum install binutils gcc git libedit libicu-devel pkg-config python2 sqlite zlib-devel -y
@@ -154,7 +169,7 @@ init-env() {
154
169
esac
155
170
;;
156
171
amazonlinux)
157
- $SUDO_FLAG yum install binutils gcc git glibc-static gzip libbsd libcurl libedit libicu sqlite libstdc++-static libuuid libxml2 tar -y
172
+ $SUDO_FLAG yum install binutils gcc git glibc-static gzip libbsd libcurl libedit libicu sqlite libstdc++-static libuuid libxml2 tar tzdata -y
158
173
;;
159
174
esac
160
175
wget -q -O - https://swift.org/keys/all-keys.asc | $SUDO_FLAG gpg --import -
0 commit comments