Update update-from_repo.sh

This commit is contained in:
WickedYoda committed 2025-02-25 13:49:24 -06:00
1 parent c6466fbd11
commit adaeccd566
1 file changed
+4 -16
+4 -16
View File
@@ -6,22 +6,10 @@ if [[ $EUID -ne 0 ]]; then
exit 1 exit 1
fi fi
# Detect if the system is Debian/Ubuntu-based # Verify Git is installed
if ! command -v apt &> /dev/null; then
echo "This script only supports Debian-based systems (Ubuntu, Debian, etc.)."
exit 1
fi
# Update package lists
echo "Updating package lists..."
apt update -y
# Check if git is installed
if ! command -v git &> /dev/null; then if ! command -v git &> /dev/null; then
echo "Git is not installed. Installing Git..." echo "Error: Git is not installed. Please install Git manually and re-run the script."
apt install -y git exit 1
else
echo "Git is already installed."
fi fi
# Specify the remote repository URL # Specify the remote repository URL
@@ -42,6 +30,6 @@ git clone "$REMOTE_REPO" "$LOCAL_DIR"
# Ensure all files have proper execution permissions # Ensure all files have proper execution permissions
echo "Setting permissions for $LOCAL_DIR..." echo "Setting permissions for $LOCAL_DIR..."
chmod -R 777 "$LOCAL_DIR" chmod -R 755 "$LOCAL_DIR"
echo "Script execution completed successfully!" echo "Script execution completed successfully!"