Skip to content

Commit 482e8e8

Browse files
committed
Check system architecture using a standard utility and only where needed
Fixes awslabs#122
1 parent c1ec460 commit 482e8e8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packaging/packager

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ done
4545
set -- "${POSITIONAL[@]}" # restore positional parameters
4646

4747
PKG_BIN_PATH=$1
48-
architecture=$(arch)
4948

5049
if [ ! -f "$PKG_BIN_PATH" ]; then
5150
echo "$PKG_BIN_PATH" - No such file.;
@@ -86,9 +85,11 @@ function package_libc_dpkg() {
8685
}
8786

8887
function package_libc_rpm() {
88+
arch=$(uname -m)
89+
8990
if type rpm > /dev/null 2>&1; then
90-
if [[ $(rpm --query --list glibc.$architecture | wc -l) -gt 1 ]]; then
91-
rpm --query --list glibc.$architecture | pluck_so_files
91+
if [[ $(rpm --query --list glibc.$arch | wc -l) -gt 1 ]]; then
92+
rpm --query --list glibc.$arch | pluck_so_files
9293
fi
9394
fi
9495
}

0 commit comments

Comments
 (0)