Skip to content

Commit

Permalink
Fix #1685
Browse files Browse the repository at this point in the history
  • Loading branch information
Lord-Grey committed Jan 22, 2024
1 parent 9c8da8d commit bc82b6f
Showing 1 changed file with 23 additions and 20 deletions.
43 changes: 23 additions & 20 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,34 +84,37 @@ function get_architecture() {
# Test if multiarchitecture setup, i.e., user-space is 32-bit
if [ "${CURRENT_ARCHITECTURE}" == "aarch64" ]; then
CURRENT_ARCHITECTURE="arm64"
fi
USER_ARCHITECTURE=${CURRENT_ARCHITECTURE}
IS_ARMHF=$(grep -m1 -c armhf /proc/$$/maps)
if [ $IS_ARMHF -ne 0 ]; then
USER_ARCHITECTURE="armhf"
else
IS_ARMEL=$(grep -m1 -c armel /proc/$$/maps)
if [ $IS_ARMEL -ne 0 ]; then
USER_ARCHITECTURE="armel"
USER_ARCHITECTURE=${CURRENT_ARCHITECTURE}
IS_ARMHF=$(grep -m1 -c armhf /proc/$$/maps)
if [ $IS_ARMHF -ne 0 ]; then
USER_ARCHITECTURE="armhf"
else
IS_ARMEL=$(grep -m1 -c armel /proc/$$/maps)
if [ $IS_ARMEL -ne 0 ]; then
USER_ARCHITECTURE="armel"
fi
fi
if [ "$CURRENT_ARCHITECTURE" != "$USER_ARCHITECTURE" ]; then
CURRENT_ARCHITECTURE=$USER_ARCHITECTURE
fi
else
# Change x86_xx to amdxx
CURRENT_ARCHITECTURE=${CURRENT_ARCHITECTURE//x86_/amd}
# Remove 'l' from armv6l, armv7l
CURRENT_ARCHITECTURE=${CURRENT_ARCHITECTURE//l/}
fi
if [ "$CURRENT_ARCHITECTURE" != "$USER_ARCHITECTURE" ]; then
CURRENT_ARCHITECTURE=$USER_ARCHITECTURE
fi

CURRENT_ARCHITECTURE=${CURRENT_ARCHITECTURE//x86_/amd}
echo "${CURRENT_ARCHITECTURE}"
}

function get_package_architecture() {
# translate the architecture in the package naming architecture
architecture=$(get_architecture)
case "$architecture" in
armel)
architecture='armv6'
armv6)
architecture='armhf'
;;
armhf)
architecture='armv7'
armv7)
architecture='armhf'
;;
esac
echo "${architecture}"
Expand All @@ -125,7 +128,7 @@ check_architecture() {
valid_architectures=''
case "$distro" in
debian | ubuntu | raspbian | libreelec)
valid_architectures='armel, armhf, arm64, amd64'
valid_architectures='armv6, armv7, armhf, arm64, amd64'
;;
fedora)
valid_architectures='amd64'
Expand Down Expand Up @@ -201,7 +204,7 @@ function install_deb_package() {
suites=${_CODEBASE}
fi

architectures="$(get_architecture)"
architectures=$(get_package_architecture)
DEB822="X-Repolib Name: Hyperion
Enabled: yes
Types: deb
Expand Down

0 comments on commit bc82b6f

Please sign in to comment.