File size: 869 Bytes
f82bb99
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/bin/bash

# Ensure the script stops executing if an error occurs
set -e

# Update the system's package list
echo "Updating system package list..."
sudo apt update

# Install necessary tools
echo "Installing gnupg and curl..."
sudo apt install -y gnupg curl

# Add GPG key to the system
echo "Adding GPG key..."
curl https://source.moyanjdc.top/deb/gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/moyan.gpg

# Add the repository to the system's sources.list.d directory
echo "Adding repository..."
mkdir -p /etc/apt/sources.list.d
echo "deb [signed-by=/usr/share/keyrings/moyan.gpg] https://source.moyanjdc.top/deb/ debs main" | sudo tee /etc/apt/sources.list.d/moyan.list

# Update the package list to include the newly added repository
echo "Updating package list..."
sudo apt update

# Print completion message
echo "Third-party repository added successfully."