Skip to content

Commit 854560c

Browse files
PKG-251 add AL2023
1 parent 44b7141 commit 854560c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packaging/scripts/mongodb-backup_builder.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@ get_system() {
127127
ARCH=$(echo $(uname -m) | sed -e 's:i686:i386:g')
128128
OS_NAME="el$RHEL"
129129
OS="rpm"
130+
elif [ -f /etc/amazon-linux-release ]; then
131+
RHEL=$(rpm --eval %amzn)
132+
ARCH=$(echo $(uname -m) | sed -e 's:i686:i386:g')
133+
OS_NAME="amzn$RHEL"
134+
OS="rpm"
130135
else
131136
ARCH=$(uname -m)
132137
OS_NAME="$(lsb_release -sc)"
@@ -164,7 +169,6 @@ install_deps() {
164169
CURPLACE=$(pwd)
165170

166171
if [ "x$OS" = "xrpm" ]; then
167-
RHEL=$(rpm --eval %rhel)
168172
yum clean all
169173
yum -y install epel-release git wget
170174
yum -y install rpm-build make rpmlint rpmdevtools golang krb5-devel
@@ -282,9 +286,6 @@ build_rpm() {
282286
mkdir -vp rpmbuild/{SOURCES,SPECS,BUILD,SRPMS,RPMS}
283287
cp $SRC_RPM rpmbuild/SRPMS/
284288

285-
RHEL=$(rpm --eval %rhel)
286-
ARCH=$(echo $(uname -m) | sed -e 's:i686:i386:g')
287-
288289
echo "RHEL=${RHEL}" >>percona-backup-mongodb.properties
289290
echo "ARCH=${ARCH}" >>percona-backup-mongodb.properties
290291
[[ ${PATH} == *"/usr/local/go/bin"* && -x /usr/local/go/bin/go ]] || export PATH=/usr/local/go/bin:${PATH}

0 commit comments

Comments
 (0)