-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall-pi-imager.sh
executable file
·36 lines (27 loc) · 1.2 KB
/
install-pi-imager.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
# Pi Imager Installer Script
# This script installs the Raspberry Pi Imager on a Debian-based Linux distribution.
# Function to print messages
function echo_message() {
echo -e "\n\e[32m$1\e[0m\n"
}
# Update the system
echo_message "Updating the system..."
sudo apt update && sudo apt upgrade -y
# Install necessary dependencies
echo_message "Installing dependencies..."
sudo apt install -y wget software-properties-common apt-transport-https
# Download and add the Raspberry Pi GPG key
echo_message "Adding Raspberry Pi GPG key..."
wget -O - https://archive.raspberrypi.org/debian/raspberrypi.gpg.key | sudo tee /etc/apt/trusted.gpg.d/raspberrypi-archive.gpg.key > /dev/null
# Add Raspberry Pi repository to the system
echo_message "Adding Raspberry Pi repository..."
echo "deb https://archive.raspberrypi.org/debian/ buster main" | sudo tee /etc/apt/sources.list.d/raspi.list
# Update the package list
echo_message "Updating package list..."
sudo apt update
# Install Raspberry Pi Imager
echo_message "Installing Raspberry Pi Imager..."
sudo apt install -y rpi-imager
# Installation complete
echo_message "Installation complete! You can now run Raspberry Pi Imager by typing 'rpi-imager' in the terminal."