Skip to content

Commit

Permalink
Fix arch detection x86 64 (#56)
Browse files Browse the repository at this point in the history
* Add protection against escaping issues
* Fix architecture detection for x86_64
  • Loading branch information
TheAssassin authored Aug 5, 2024
1 parent cec4c1a commit 4799cde
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/build-in-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ ls -lh runtime
# append architecture prefix
# since uname gives the kernel architecture but we need the userland architecture, we check /bin/bash
# all we have to do is convert uname's expected output to AppImage's semi-official suffix style
runtime=$(file -L /bin/bash)
runtime="$(file -L /bin/bash)"

if [[ $runtime =~ 80386 ]]; then
if [[ "$runtime" =~ 80386 ]]; then
architecture=i686
elif [[ $runtime =~ aarch64 ]]; then
elif [[ "$runtime" =~ aarch64 ]]; then
architecture=aarch64
elif [[ $runtime =~ EABI5 ]]; then
elif [[ "$runtime" =~ EABI5 ]]; then
architecture=armhf
elif [[ $runtime =~ x86_64 ]]; then
elif [[ "$runtime" =~ x86-64 ]]; then
architecture=x86_64
else
echo "Unsupported architecture: ${runtime#* }"
Expand Down

0 comments on commit 4799cde

Please sign in to comment.