Skip to content

Commit

Permalink
Create rename_current_arch_binary.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
fredclausen committed Jan 7, 2024
1 parent 497d6e2 commit 051942f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions rootfs/rename_current_arch_binary.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

set -x

ls -la /opt/

# determine which binary to keep
if /opt/acars-bridge.amd64 --version > /dev/null 2>&1; then
mv -v /opt/acars-bridge.amd64 /opt/acars-bridge
elif /opt/acars-bridge.arm64 --version > /dev/null 2>&1; then
mv -v /opt/acars-bridge.arm64 /opt/acars-bridge
elif /opt/acars-bridge.armv7 --version > /dev/null 2>&1; then
mv -v /opt/acars-bridge.armv7 /opt/acars-bridge
else
>&2 echo "ERROR: Unsupported architecture"
exit 1
fi

0 comments on commit 051942f

Please sign in to comment.