#!/bin/bash # This script will download and install the necessary files to # drive the 3.5" touch display. VERSION="180331" SOURCE="https://www.waveshare.com/w/upload/3/34/LCD-show-180331.tar.gz" cd ~ # Check if drivers archive already exists file="./LCD_show_$VERSION.tar.gz" if [ -f "$file" ] then echo "$file found." else echo "$file not found - downloading" wget -O "LCD_show_$VERSION.tar.gz" $SOURCE fi # Check if archive is already extracted directory="./LCD_show_$VERSION/" if [ -d "$directory" ] then echo already extracted else echo extracting... tar -xvzf LCD_show_$VERSION.tar.gz fi echo Beginning installation cd LCD-show/ chmod +x LCD35-show ./LCD35-show