Skip to content

Instantly share code, notes, and snippets.

@nicholasadamou
Last active September 24, 2017 13:12
Show Gist options
  • Save nicholasadamou/561385b9121c35d7434f597e4072957c to your computer and use it in GitHub Desktop.
Save nicholasadamou/561385b9121c35d7434f597e4072957c to your computer and use it in GitHub Desktop.
Update Kali-Pi drivers

Update Drivers for Kali-Pi

Here's a short shell script to quickly update Kali-Pi drivers.

  • Run the script, like this: curl https://gist.github.com/nicholasadamou/561385b9121c35d7434f597e4072957c/raw/515cf36604133959eac10ec9534aa981d7101645/update.sh | bash

or

  • Add as an alias, like this: alias rpu="curl https://gist.github.com/nicholasadamou/561385b9121c35d7434f597e4072957c/raw/515cf36604133959eac10ec9534aa981d7101645/update.sh | bash"

And run the script, like this: rpu.

#!/bin/bash
x="/usr/local/src"
rm -rf "${x:?}"/*
wget -O "$x"/re4son_kali-pi-tft_kernel_current.tar.xz https://whitedome.com.au/re4son/downloads/11299/
tar -xJf "$x"/re4son_kali-pi-tft_kernel_current.tar.xz -C "$x"
if [ -e "$x"/re4son_kali-pi-tft_kernel_current.tar.xz ]; then
rm -rf "$x"/re4son_kali-pi-tft_kernel_current.tar.xz
fi
boot_dir='/dev/mmcblk0p1'
if [ "$(df -P /boot | tail -1 | cut -d' ' -f 1)" = "$boot_dir" ]; then
echo "$boot_dir is already mounted @ /boot/."
else
mount "$boot_dir" /boot/
fi
cd /usr/local/src/re4son-kernel_*/ && ./install.sh
if [ "$(df -P /boot | tail -1 | cut -d' ' -f 1)" = "$boot_dir" ]; then
umount /boot/
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment