From b9175be3959ceec736cdaa2a2961b162c023a260 Mon Sep 17 00:00:00 2001 From: pika Date: Tue, 20 May 2025 21:07:42 +0200 Subject: [PATCH] wip --- README.ai.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/README.ai.md b/README.ai.md index 84968f8..8d0e9d7 100644 --- a/README.ai.md +++ b/README.ai.md @@ -63,11 +63,11 @@ checkAndInstall curl wget 2. Logging Functions: -echo_error "message" - Red error message -echo_warning "message" - Yellow warning message -echo_info "message" - Blue info message -echo_note "message" - Green note message -echo_pkg type "message" - Special package-related messages +`echo_error` "message" - Red error message
+`echo_warning` "message" - Yellow warning message
+`echo_info` "message" - Blue info message
+`echo_note` "message" - Green note message
+`echo_pkg` type "message" - Special package-related messages Types for echo_pkg: @@ -85,10 +85,10 @@ echo_pkg install "Installing package" 3. Utility Functions: -command_exists cmd - Checks if command exists (silent) -run cmd - Runs command with silent mode support -source_script url - Sources another script from URL or file -silentexec cmd - Runs command silently +`command_exists cmd` - Checks if command exists (silent)
+`run cmd` - Runs command with silent mode support
+`source_script url` - Sources another script from URL or file
+`silentexec cmd` - Runs command silently Example: @@ -105,18 +105,18 @@ source_script "https://example.com/script.sh" For Debian/Ubuntu: - Version codename variables: - $trixie (Debian 13) - $bookworm (Debian 12) - $jammy (Ubuntu 22.04) - $focal (Ubuntu 20.04) + - `$trixie` (Debian 13) + - `$bookworm` (Debian 12) + - `$jammy` (Ubuntu 22.04) + - `$focal` (Ubuntu 20.04) For Fedora: -- Version variables like $fedora_40 for Fedora 40 +- Version variables like `$fedora_40` for Fedora 40 For Arch: -- $aur - true if yay/paru is available +- `$aur` - `true` if yay/paru is available ### ADVANCED USAGE @@ -159,14 +159,14 @@ fi 2. Use the provided echo functions for consistent output 3. For distro-specific code, check the boolean variables first 4. Use arrays with checkAndInstall for multiple packages -5. Use source_script for modular script organization +5. Use `source_script` for modular script organization ### TROUBLESHOOTING If something doesn't work: -1. Check if /etc/os-release exists +1. Check if `/etc/os-release` exists 2. Verify internet connection for remote scripts 3. Check permissions (script handles sudo automatically) -4. Verify $distro variable matches your system +4. Verify `$distro` variable matches your system 5. Check if required package managers are available