Skip to content

Commit

Permalink
Updated install script
Browse files Browse the repository at this point in the history
Made the script fetch the latest headers from the official repos
  • Loading branch information
igormp committed Jan 23, 2017
1 parent cfe558c commit d03fbcf
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions utils/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,17 @@ else
echo "Installing required dependencies"
sudo apt-get install -y --force-yes dkms cpp-4.7 gcc-4.7 git joystick ||
{ echo "ERROR : Unable to install required dependencies" && exit 1 ;}
echo "Downloading current kernel headers"
wget http://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi/linux-headers-`uname -r`_`uname -r`-2_armhf.deb ||
{ echo "ERROR : Unable to find kernel headers" && exit 1 ;}
echo "Installing current kernel headers"
sudo dpkg -i linux-headers-`uname -r`_`uname -r`-2_armhf.deb ||
echo "Downloading and installing current kernel headers"
sudo apt-get install -y --force-yes raspberrypi-kernel-headers ||
{ echo "ERROR : Unable to install kernel headers" && exit 1 ;}
rm linux-headers-`uname -r`_`uname -r`-2_armhf.deb
echo "Downloading mk_arcade_joystick_rpi 0.1.4"
wget https://github.com/digitalLumberjack/mk_arcade_joystick_rpi/releases/download/v0.1.4/mk-arcade-joystick-rpi-0.1.4.deb ||
wget https://github.com/recalbox/mk_arcade_joystick_rpi/releases/download/v0.1.4/mk-arcade-joystick-rpi-0.1.4.deb ||
{ echo "ERROR : Unable to find mk_arcade_joystick_package" && exit 1 ;}
echo "Installing mk_arcade_joystick_rpi 0.1.4"
sudo dpkg -i mk-arcade-joystick-rpi-0.1.4.deb ||
{ echo "ERROR : Unable to install mk_arcade_joystick_rpi" && exit 1 ;}
echo "Installation OK"
echo "Load the module with 'sudo modprobe mk_arcade_joystick_rpi map=1' for 1 joystick"
echo "or with 'sudo modprobe mk_arcade_joystick_rpi map=1,2' for 2 joysticks"
echo "See https://github.com/digitalLumberjack/mk_arcade_joystick_rpi#loading-the-driver for more details"
fi

echo "See https://github.com/recalbox/mk_arcade_joystick_rpi#loading-the-driver for more details"
fi

0 comments on commit d03fbcf

Please sign in to comment.