Created
June 9, 2024 12:22
-
-
Save fpaupier/09ace384e33fc210e72975d4e07b37e4 to your computer and use it in GitHub Desktop.
Cloud instance instal utils
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Ensure the script is run as root | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" | |
exit 1 | |
fi | |
# Install oh my bash | |
bash -c "$(curl -fsSL https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/tools/install.sh)" | |
# Set up SSH key for GitHub | |
echo "Setting up SSH key for GitHub..." | |
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N "" || { echo "SSH key generation failed"; exit 1; } | |
# Make a project repository | |
echo "Cloning the project repository..." | |
mkdir -p projects && cd projects || exit | |
sudo apt update -y | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment