updated
This commit is contained in:
+37
-11
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user