This commit is contained in:
Jake Pullen
2025-05-08 18:44:41 +01:00
parent db25d041e3
commit f89bd10465
3 changed files with 73 additions and 11 deletions
+37 -11
View File
@@ -1,10 +1,33 @@
#!/bin/bash
# echo 'test'
$ ssh-keygen -C "$(whoami)@$(uname -n)-$(date -I) git key"
cat /home/$(whoami)/.ssh/id_rsa.pub
# Get current user
USER=$(whoami)
# Define paths
SSH_DIR="/home/$USER/.ssh"
KEY_FILE="$SSH_DIR/id_rsa.pub"
# Create .ssh directory if it doesn't exist
if [ ! -d "$SSH_DIR" ]; then
mkdir -p "$SSH_DIR"
echo "Created .ssh directory for user $USER"
fi
# Check if the public key file exists
if [ -f "$KEY_FILE" ]; then
echo "Public key already exists at $KEY_FILE"
else
# Generate SSH key with a comment based on user, hostname, and timestamp
ssh-keygen -C "$USER@$(uname -n)-$(date -I)" -f "$SSH_DIR/id_rsa"
echo "SSH key generated successfully at $KEY_FILE"
fi
# Optionally, display the public key if it was generated
if [ -f "$KEY_FILE" ]; then
echo "Public key content:"
cat "$KEY_FILE"
fi
curl -fsSL https://christitus.com/linux | sh
package_list=(
"alacritty"
@@ -12,12 +35,15 @@ package_list=(
"discord"
"fastfetch"
"firefox"
"git"
"spotify (Launcher)"
"spotify-launcher"
"ollama"
)
for package in "${package_list[@]}"
do
echo $package
done
# sudo pacman -S --noconfirm
# Create a string of packages
package_string=$(IFS=' ' ; echo "${package_list[@]}")
# Install all packages from the string
echo "Attempting to install packages: $package_string"
sudo pacman -S --needed --noconfirm $package_string
curl -fsSL https://christitus.com/linux | sh