Skip to content
Open
Changes from all commits
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
14 changes: 13 additions & 1 deletion INSTALL.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
#!/usr/bin/env bash

# First install the configuration files:
# Important: The script should check if DKMS is Present, because its important so no one would cry at issues
CHECK=$(command -v dkms 2>/dev/null)
if [ -n "$CHECK" ]
then
echo "DKMS Present, Istalling Anbox Modules"
else
echo "DKMS Did not respond, it seems that DKMS is not Present or you are not running in sudo/root mode"
echo "To make sure, please install dkms and try running the script again with sudo"
Comment on lines +5 to +10

Choose a reason for hiding this comment

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

Suggested change
if [ -n "$CHECK" ]
then
echo "DKMS Present, Istalling Anbox Modules"
else
echo "DKMS Did not respond, it seems that DKMS is not Present or you are not running in sudo/root mode"
echo "To make sure, please install dkms and try running the script again with sudo"
if ! [ -n "$CHECK" ]
then
>&2 echo "DKMS command not found, it seems that DKMS is not installed or you do not have permission to use it."
>&2 echo "Please install the dkms package from your distribution vendor and re-run this tool as root."

I don't think we need to explicitly state that we found DKMS, don't mind the quick reword

exit 1
fi
unset CHECK

# Start the Operation! : install the configuration files:
sudo cp anbox.conf /etc/modules-load.d/
sudo cp 99-anbox.rules /lib/udev/rules.d/

Expand Down