Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions halium-install
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,16 @@ check_busybox()
export device_architecture=$(do_shell "uname -m")
export busybox_exists=$(do_shell "if [ -d /sbin/busybox ]; then echo true; else echo false; fi")

if [ $busybox_exists = "true" ]; then
if [ $busybox_exists = true ]; then
echo 'Using already installed busybox'
else
if [ $device_architecture = x86_64 ]; then
wget https://github.com/meefik/busybox/raw/master/app/src/main/assets/intel/static/bin/busybox
elif [ $device_architecture = armv7l ]; then
wget https://github.com/meefik/busybox/raw/master/app/src/main/assets/arm/static/bin/busybox
elif [ $device_architecture = arm64 ]; then
elif [ $device_architecture = aarch64 ]; then
wget https://github.com/meefik/busybox/raw/master/app/src/main/assets/arm/static/bin/busybox
elif [ $device_architecture = armv8l ]; then
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should do if device_architecture is armv7l or aarch64 or armv8l and not three seperate branches that do exactly the same.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm new to bash and didn't know it can do this. Will of course correct :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better now?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep looks good :)

wget https://github.com/meefik/busybox/raw/master/app/src/main/assets/arm/static/bin/busybox
fi

Expand Down