wip
This commit is contained in:
parent
faee540985
commit
b9175be395
1 changed files with 18 additions and 18 deletions
36
README.ai.md
36
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 </br>
|
||||
`echo_warning` "message" - Yellow warning message </br>
|
||||
`echo_info` "message" - Blue info message </br>
|
||||
`echo_note` "message" - Green note message </br>
|
||||
`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) </br>
|
||||
`run cmd` - Runs command with silent mode support </br>
|
||||
`source_script url` - Sources another script from URL or file </br>
|
||||
`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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue