### Direct Fount Installation via Bash Script (Bash) Source: https://github.com/steve02081504/fount/blob/master/readme.md This command downloads and executes the main Fount installation script from GitHub using `curl` and pipes it directly to `bash`. The `-s init` argument is passed to the script, initiating the Fount setup process on Linux/macOS/Android systems. This is a common method for quick, one-liner installations. ```Bash curl -fsSL https://raw.githubusercontent.com/steve02081504/fount/refs/heads/master/src/runner/main.sh | bash -s init ``` -------------------------------- ### Combining Fount Badge with Automatic Installation Link in Markdown Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.en-UK.md This example shows how to integrate a Fount badge with an automatic installation link to create a visually appealing and functional button. This combined Markdown snippet allows users to showcase their Fount component with a badge that, when clicked, directly triggers its installation, enhancing both aesthetics and practicality. ```Markdown [![fount character](https://steve02081504.github.io/fount/badges/fount_character.svg)](https://steve02081504.github.io/fount/protocol?url=fount://runshell/install/install;https://github.com/steve02081504/GentianAphrodite/releases/latest/download/GentianAphrodite.zip) ``` -------------------------------- ### Installing Core Dependencies (Shell) Source: https://github.com/steve02081504/fount/blob/master/readme.md This snippet demonstrates the usage of the `install_package` function to install `curl` and `bash`. These packages are typically prerequisites for downloading and executing further installation scripts, ensuring the system has essential tools for the Fount setup process. ```Shell install_package curl; install_package bash ``` -------------------------------- ### Installing Core Dependencies and Fount (Shell) Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.en-UK.md These commands utilize the `install_package` function to ensure `curl` and `bash` are present, then export a variable tracking installed packages. Finally, they download and execute the fount runner script from GitHub to initialize the platform and source the user's profile. ```Shell install_package curl; install_package bash export FOUNT_AUTO_INSTALLED_PACKAGES="$INSTALLED_PACKAGES" curl -fsSL https://raw.githubusercontent.com/steve02081504/fount/refs/heads/master/src/runner/main.sh | bash -s init . "$HOME/.profile" ``` -------------------------------- ### Generating an Automatic Fount Component Installation Link Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.en-UK.md This code snippet illustrates the structure of an automatic installation link for Fount components. By combining the Fount protocol URL with a component's ZIP or Git repository link, users can create a 'magic link' that allows direct, one-click installation of their creations into the Fount environment. ```Markdown https://steve02081504.github.io/fount/protocol?url=fount://runshell/install/install;https://github.com/steve02081504/GentianAphrodite/releases/latest/download/GentianAphrodite.zip ``` -------------------------------- ### Installing Core Dependencies for Fount with Bash Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.fr-FR.md These commands utilize the 'install_package' function to ensure that 'curl' and 'bash' are installed on the system. These are essential prerequisites for downloading and executing the 'fount' installer script. ```Bash install_package curl; install_package bash ``` -------------------------------- ### Initializing and Installing Core Dependencies (Bash) Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.ko-KR.md This section initializes the `INSTALLED_PACKAGES` variable, then calls the `install_package` function to ensure `curl` and `bash` are installed. Finally, it exports the `FOUNT_AUTO_INSTALLED_PACKAGES` environment variable, making the list of automatically installed packages available to subsequent processes. ```bash INSTALLED_PACKAGES="${FOUNT_AUTO_INSTALLED_PACKAGES:-}" install_package curl; install_package bash export FOUNT_AUTO_INSTALLED_PACKAGES="$INSTALLED_PACKAGES" ``` -------------------------------- ### Direct Fount Installation (PowerShell) Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.en-UK.md This PowerShell command downloads and immediately executes the fount installer script from GitHub. Users can optionally define the `$env:FOUNT_DIR` environment variable to specify the installation directory before running this command. ```PowerShell # If needed, define the environment variable $env:FOUNT_DIR to specify the fount directory irm https://raw.githubusercontent.com/steve02081504/fount/refs/heads/master/src/runner/main.ps1 | iex ``` -------------------------------- ### Installing Fount Directly with PowerShell Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.fr-FR.md This PowerShell command downloads the 'main.ps1' script from the 'fount' GitHub repository using 'Invoke-RestMethod' (irm) and executes it directly using 'Invoke-Expression' (iex). It provides a simple, recommended way to install 'fount' on Windows, with an optional comment about setting 'FOUNT_DIR'. ```PowerShell # Si nécessaire, définissez la variable d'environnement $env:FOUNT_DIR pour spécifier le répertoire fount irm https://raw.githubusercontent.com/steve02081504/fount/refs/heads/master/src/runner/main.ps1 | iex ``` -------------------------------- ### Simulating Fount Installation with PowerShell Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.fr-FR.md This PowerShell snippet demonstrates a simulated installation process. It first downloads the 'main.ps1' script content, then defines a temporary function 'fountInstaller' containing that content, and finally executes 'fountInstaller' with the 'init' argument. This method allows for inspection or modification of the script content before execution. ```PowerShell $scriptContent = Invoke-RestMethod https://raw.githubusercontent.com/steve02081504/fount/refs/heads/master/src/runner/main.ps1 Invoke-Expression "function fountInstaller { $scriptContent }" fountInstaller init ``` -------------------------------- ### Fount Installation Dry Run (PowerShell) Source: https://github.com/steve02081504/fount/blob/master/readme.md This PowerShell snippet performs a 'dry run' of the Fount installation script. It downloads the script content, defines it as a function `fountInstaller`, and then calls `fountInstaller init`. This allows inspection or testing of the installation logic without fully committing to the changes, useful for debugging or custom setups. ```PowerShell $scriptContent = Invoke-RestMethod https://raw.githubusercontent.com/steve02081504/fount/refs/heads/master/src/runner/main.ps1 Invoke-Expression "function fountInstaller { $scriptContent }" fountInstaller init ``` -------------------------------- ### Installing Core Dependencies (Bash) Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.zh-CN.md These commands invoke the `install_package` function to ensure that `curl` and `bash` are installed on the system. These are likely prerequisites for further setup or execution of Fount scripts. ```bash install_package curl; install_package bash ``` -------------------------------- ### Installing Core Dependencies and Exporting Installed Packages - Bash Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.ja-JP.md These commands utilize the `install_package` function to install `curl` and `bash`, which are essential dependencies. Afterward, they export a semicolon-separated list of all successfully installed packages to the `FOUNT_AUTO_INSTALLED_PACKAGES` environment variable. ```Bash install_package curl; install_package bash export FOUNT_AUTO_INSTALLED_PACKAGES="$INSTALLED_PACKAGES" ``` -------------------------------- ### Installing Packages with Cross-Platform Support - Bash Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.ja-JP.md This comprehensive Bash function attempts to install a specified package using a wide range of common package managers (pkg, snap, apt-get, brew, pacman, dnf, yum, zypper, apk). It first checks if the package is already installed and, upon successful installation, records the package name. ```Bash install_package() { package_name="$1"; install_successful=0; if command -v "$package_name" >/dev/null 2>&1; then return 0; fi; if command -v pkg >/dev/null 2>&1; then pkg install -y "$package_name" && install_successful=1; fi; if [ "$install_successful" -eq 0 ] && command -v snap >/dev/null 2>&1; then snap install "$package_name" && install_successful=1; fi; if [ "$install_successful" -eq 0 ] && command -v apt-get >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo apt-get update; sudo apt-get install -y "$package_name" && install_successful=1; else apt-get update; apt-get install -y "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v brew >/dev/null 2>&1; then if ! brew list --formula "$package_name" >/dev/null 2>&1; then brew install "$package_name" && install_successful=1; else install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v pacman >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo pacman -Syy; sudo pacman -S --needed --noconfirm "$package_name" && install_successful=1; else pacman -Syy; pacman -S --needed --noconfirm "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v dnf >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo dnf install -y "$package_name" && install_successful=1; else dnf install -y "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v yum >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo yum install -y "$package_name" && install_successful=1; else yum install -y "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v zypper >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo zypper install -y --no-confirm "$package_name" && install_successful=1; else zypper install -y --no-confirm "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v apk >/dev/null 2>&1; then apk add --update "$package_name" && install_successful=1; fi; if [ "$install_successful" -eq 1 ]; then if [ -z "$INSTALLED_PACKAGES" ]; then INSTALLED_PACKAGES="$package_name"; else INSTALLED_PACKAGES="$INSTALLED_PACKAGES;$package_name"; fi; return 0; else echo "Error: $package_name installation failed." >&2; return 1; fi; } ``` -------------------------------- ### Combining Fount Badge with Installation Link in Markdown Source: https://github.com/steve02081504/fount/blob/master/readme.md This snippet illustrates how to create a clickable button in Markdown that combines a Fount character badge with an automatic installation link. This allows users to visually identify the component and directly initiate its installation by clicking the badge. ```Markdown [![fount character](https://steve02081504.github.io/fount/badges/fount_character.svg)](https://steve02081504.github.io/fount/protocol?url=fount://runshell/install/install;https://github.com/steve02081504/GentianAphrodite/releases/latest/download/GentianAphrodite.zip) ``` -------------------------------- ### Initializing Fount via Remote Script Execution - PowerShell Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.ja-JP.md This PowerShell command downloads the `fount` initialization script from a remote URL using `Invoke-RestMethod` (irm) and then executes its content directly using `Invoke-Expression` (iex). This provides a streamlined installation for Windows users. ```PowerShell irm https://raw.githubusercontent.com/steve02081504/fount/refs/heads/master/src/runner/main.ps1 | iex ``` -------------------------------- ### Direct Fount Installation (PowerShell) Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.ko-KR.md This PowerShell command downloads the Fount installation script from GitHub using `Invoke-RestMethod` (irm) and executes it directly using `Invoke-Expression` (iex). It includes a comment suggesting defining `$env:FOUNT_DIR` if a specific Fount directory is needed. ```powershell # 필요한 경우 fount 디렉토리를 지정하기 위해 환경 변수 $env:FOUNT_DIR을 정의합니다.\nirm https://raw.githubusercontent.com/steve02081504/fount/refs/heads/master/src/runner/main.ps1 | iex ``` -------------------------------- ### Dry Run Fount Installation (PowerShell) Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.en-UK.md This PowerShell snippet demonstrates how to perform a dry run of the fount installation. It fetches the script content, defines it as a function, and then executes the `init` command within that function, allowing inspection without permanent changes. ```PowerShell $scriptContent = Invoke-RestMethod https://raw.githubusercontent.com/steve02081504/fount/refs/heads/master/src/runner/main.ps1 Invoke-Expression "function fountInstaller { $scriptContent }" fountInstaller init ``` -------------------------------- ### Initializing Fount via Remote Script Execution - Bash Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.ja-JP.md This command downloads and executes the `fount` initialization script directly from GitHub using `curl`. The script is piped to `bash` with the `init` argument, providing a quick and direct method for setting up Fount. ```Bash curl -fsSL https://raw.githubusercontent.com/steve02081504/fount/refs/heads/master/src/runner/main.sh | bash -s init ``` -------------------------------- ### Installing Core Dependencies (Bash) Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.ko-KR.md This snippet demonstrates the usage of the `install_package` function to install `curl` and `bash`. These are essential dependencies for the Fount project, ensuring that the necessary tools are available for subsequent operations. ```bash install_package curl; install_package bash ``` -------------------------------- ### Universal Package Installation Function (Shell) Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.en-UK.md This shell function attempts to install a specified package using various package managers (pkg, snap, apt-get, brew, pacman, dnf, yum, zypper, apk) based on availability. It checks if the package is already installed and updates a global variable `INSTALLED_PACKAGES` upon successful installation. It returns 0 on success and 1 on failure. ```Shell install_package() { package_name="$1"; install_successful=0; if command -v "$package_name" >/dev/null 2>&1; then return 0; fi; if command -v pkg >/dev/null 2>&1; then pkg install -y "$package_name" && install_successful=1; fi; if [ "$install_successful" -eq 0 ] && command -v snap >/dev/null 2>&1; then snap install "$package_name" && install_successful=1; fi; if [ "$install_successful" -eq 0 ] && command -v apt-get >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo apt-get update; sudo apt-get install -y "$package_name" && install_successful=1; else apt-get update; apt-get install -y "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v brew >/dev/null 2>&1; then if ! brew list --formula "$package_name" >/dev/null 2>&1; then brew install "$package_name" && install_successful=1; else install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v pacman >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo pacman -Syy; sudo pacman -S --needed --noconfirm "$package_name" && install_successful=1; else pacman -Syy; pacman -S --needed --noconfirm "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v dnf >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo dnf install -y "$package_name" && install_successful=1; else dnf install -y "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v yum >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo yum install -y "$package_name" && install_successful=1; else yum install -y "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v zypper >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo zypper install -y --no-confirm "$package_name" && install_successful=1; else zypper install -y --no-confirm "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v apk >/dev/null 2>&1; then apk add --update "$package_name" && install_successful=1; fi; if [ "$install_successful" -eq 1 ]; then if [ -z "$INSTALLED_PACKAGES" ]; then INSTALLED_PACKAGES="$package_name"; else INSTALLED_PACKAGES="$INSTALLED_PACKAGES;$package_name"; fi; return 0; else echo "Error: $package_name installation failed." >&2; return 1; fi; } ``` -------------------------------- ### Performing a Dry Run for Fount Installation - PowerShell Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.ja-JP.md This PowerShell snippet demonstrates how to fetch the Fount installation script content without immediate execution. It stores the script in a variable, defines it as a local function, and then calls that function with the 'init' argument, allowing for inspection or a 'dry run' before full installation. ```PowerShell $scriptContent = Invoke-RestMethod https://raw.githubusercontent.com/steve02081504/fount/refs/heads/master/src/runner/main.ps1 Invoke-Expression "function fountInstaller { $scriptContent }" fountInstaller init ``` -------------------------------- ### Generating Fount Automatic Installation Link Source: https://github.com/steve02081504/fount/blob/master/readme.md This snippet shows the structure for creating an automatic installation link for a Fount component. By combining the Fount protocol URL with the component's ZIP or Git repository link, users can directly install the component with a single click. ```URL https://steve02081504.github.io/fount/protocol?url=fount://runshell/install/install;https://github.com/steve02081504/GentianAphrodite/releases/latest/download/GentianAphrodite.zip ``` -------------------------------- ### Performing a Trial Run of Fount Installation - PowerShell Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.de-DE.md This PowerShell snippet allows for a "trial run" of the Fount installer by first downloading the script content, then defining it as a local function `fountInstaller`, and finally executing that function with the `init` argument. This approach is useful for inspecting the script or running it in a controlled, isolated manner before a full installation. ```PowerShell $scriptContent = Invoke-RestMethod https://raw.githubusercontent.com/steve02081504/fount/refs/heads/master/src/runner/main.ps1 Invoke-Expression "function fountInstaller { $scriptContent }" fountInstaller init ``` -------------------------------- ### Initializing Fount via Remote Bash Script Execution Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.fr-FR.md This command downloads the 'main.sh' script from the 'fount' GitHub repository using 'curl' and pipes its content directly to 'bash' for execution. The '-s init' argument passes 'init' as the first argument to the script, likely triggering the 'fount' installation process. ```Bash curl -fsSL https://raw.githubusercontent.com/steve02081504/fount/refs/heads/master/src/runner/main.sh | bash -s init ``` -------------------------------- ### Defining Multi-Platform Package Installation Function (Bash) Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.ko-KR.md This function, `install_package`, attempts to install a specified package using a wide range of common package managers (pkg, snap, apt-get, brew, pacman, dnf, yum, zypper, apk). It checks for the existence of each manager and tries to install the package, updating a global variable `INSTALLED_PACKAGES` upon success. It returns 0 on success and 1 on failure. ```bash install_package() { package_name="$1"; install_successful=0; if command -v "$package_name" >/dev/null 2>&1; then return 0; fi; if command -v pkg >/dev/null 2>&1; then pkg install -y "$package_name" && install_successful=1; fi; if [ "$install_successful" -eq 0 ] && command -v snap >/dev/null 2>&1; then snap install "$package_name" && install_successful=1; fi; if [ "$install_successful" -eq 0 ] && command -v apt-get >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo apt-get update; sudo apt-get install -y "$package_name" && install_successful=1; else apt-get update; apt-get install -y "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v brew >/dev/null 2>&1; then if ! brew list --formula "$package_name" >/dev/null 2>&1; then brew install "$package_name" && install_successful=1; else install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v pacman >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo pacman -Syy; sudo pacman -S --needed --noconfirm "$package_name" && install_successful=1; else pacman -Syy; pacman -S --needed --noconfirm "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v dnf >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo dnf install -y "$package_name" && install_successful=1; else dnf install -y "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v yum >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo yum install -y "$package_name" && install_successful=1; else yum install -y "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v zypper >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo zypper install -y --no-confirm "$package_name" && install_successful=1; else zypper install -y --no-confirm "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v apk >/dev/null 2>&1; then apk add --update "$package_name" && install_successful=1; fi; if [ "$install_successful" -eq 1 ]; then if [ -z "$INSTALLED_PACKAGES" ]; then INSTALLED_PACKAGES="$package_name"; else INSTALLED_PACKAGES="$INSTALLED_PACKAGES;$package_name"; fi; return 0; else echo "Error: $package_name installation failed." >&2; return 1; fi; } ``` -------------------------------- ### Fount Installation Dry Run (PowerShell) Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.ko-KR.md This PowerShell snippet performs a dry run of the Fount installation. It fetches the script content, defines a temporary function `fountInstaller` with that content, and then calls `fountInstaller init` to simulate the installation without directly executing the remote script in the global scope. ```powershell $scriptContent = Invoke-RestMethod https://raw.githubusercontent.com/steve02081504/fount/refs/heads/master/src/runner/main.ps1\nInvoke-Expression "function fountInstaller { $scriptContent }"\nfountInstaller init ``` -------------------------------- ### Direct Fount Installation (PowerShell) Source: https://github.com/steve02081504/fount/blob/master/readme.md This PowerShell command downloads the Fount installation script from GitHub using `Invoke-RestMethod` (irm) and executes it directly using `Invoke-Expression` (iex). It's the recommended method for a straightforward Fount installation on Windows systems, optionally allowing the `FOUNT_DIR` environment variable to be set beforehand. ```PowerShell irm https://raw.githubusercontent.com/steve02081504/fount/refs/heads/master/src/runner/main.ps1 | iex ``` -------------------------------- ### Installing Core Dependencies (Shell) Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.hi-IN.md These commands utilize the install_package function to install curl and bash, which are essential dependencies for the Fount project. This ensures that the necessary tools are available for subsequent setup and execution. ```Shell install_package curl; install_package bash ``` -------------------------------- ### Installing System Packages with Bash install_package Function Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.fr-FR.md This Bash function attempts to install a specified package using various system package managers (pkg, snap, apt-get, brew, pacman, dnf, yum, zypper, apk). It checks for the presence of each package manager and uses the first available one to install the package, optionally using 'sudo' if available. The function returns 0 on success and 1 on failure, also tracking successfully installed packages in 'INSTALLED_PACKAGES'. ```Bash install_package() { package_name="$1"; install_successful=0; if command -v "$package_name" >/dev/null 2>&1; then return 0; fi; if command -v pkg >/dev/null 2>&1; then pkg install -y "$package_name" && install_successful=1; fi; if [ "$install_successful" -eq 0 ] && command -v snap >/dev/null 2>&1; then snap install "$package_name" && install_successful=1; fi; if [ "$install_successful" -eq 0 ] && command -v apt-get >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo apt-get update; sudo apt-get install -y "$package_name" && install_successful=1; else apt-get update; apt-get install -y "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v brew >/dev/null 2>&1; then if ! brew list --formula "$package_name" >/dev/null 2>&1; then brew install "$package_name" && install_successful=1; else install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v pacman >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo pacman -Syy; sudo pacman -S --needed --noconfirm "$package_name" && install_successful=1; else pacman -Syy; pacman -S --needed --noconfirm "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v dnf >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo dnf install -y "$package_name" && install_successful=1; else dnf install -y "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v yum >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo yum install -y "$package_name" && install_successful=1; else yum install -y "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v zypper >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo zypper install -y --no-confirm "$package_name" && install_successful=1; else zypper install -y --no-confirm "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v apk >/dev/null 2>&1; then apk add --update "$package_name" && install_successful=1; fi; if [ "$install_successful" -eq 1 ]; then if [ -z "$INSTALLED_PACKAGES" ]; then INSTALLED_PACKAGES="$package_name"; else INSTALLED_PACKAGES="$INSTALLED_PACKAGES;$package_name"; fi; return 0; else echo "Error: $package_name installation failed." >&2; return 1; fi; } ``` -------------------------------- ### Automated Package Installation and Fount Runner Execution - Bash Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.en-UK.md This script defines an 'install_package' function that attempts to install a given package using various system package managers (pkg, snap, apt-get, brew, pacman, dnf, yum, zypper, apk). It then uses this function to install 'curl' and 'bash', updates the 'FOUNT_AUTO_INSTALLED_PACKAGES' environment variable, downloads and executes the main 'fount' runner script, and sources the user's '.profile'. ```bash INSTALLED_PACKAGES="${FOUNT_AUTO_INSTALLED_PACKAGES:-}" install_package() { package_name="$1"; install_successful=0; if command -v "$package_name" >/dev/null 2>&1; then return 0; fi; if command -v pkg >/dev/null 2>&1; then pkg install -y "$package_name" && install_successful=1; fi; if [ "$install_successful" -eq 0 ] && command -v snap >/dev/null 2>&1; then snap install "$package_name" && install_successful=1; fi; if [ "$install_successful" -eq 0 ] && command -v apt-get >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo apt-get update; sudo apt-get install -y "$package_name" && install_successful=1; else apt-get update; apt-get install -y "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v brew >/dev/null 2>&1; then if ! brew list --formula "$package_name" >/dev/null 2>&1; then brew install "$package_name" && install_successful=1; else install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v pacman >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo pacman -Syy; sudo pacman -S --needed --noconfirm "$package_name" && install_successful=1; else pacman -Syy; pacman -S --needed --noconfirm "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v dnf >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo dnf install -y "$package_name" && install_successful=1; else dnf install -y "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v yum >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo yum install -y "$package_name" && install_successful=1; else yum install -y "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v zypper >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo zypper install -y --no-confirm "$package_name" && install_successful=1; else zypper install -y --no-confirm "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v apk >/dev/null 2>&1; then apk add --update "$package_name" && install_successful=1; fi; if [ "$install_successful" -eq 1 ]; then if [ -z "$INSTALLED_PACKAGES" ]; then INSTALLED_PACKAGES="$package_name"; else INSTALLED_PACKAGES="$INSTALLED_PACKAGES;$package_name"; fi; return 0; else echo "Error: $package_name installation failed." >&2; return 1; fi; } install_package curl; install_package bash export FOUNT_AUTO_INSTALLED_PACKAGES="$INSTALLED_PACKAGES" curl -fsSL https://raw.githubusercontent.com/steve02081504/fount/refs/heads/master/src/runner/main.sh | bash . "$HOME/.profile" ``` -------------------------------- ### Direct Fount Installation (PowerShell) Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.zh-CN.md This PowerShell command downloads the `main.ps1` script from the Fount GitHub repository using `Invoke-RestMethod` (`irm`) and executes it directly using `Invoke-Expression` (`iex`). It also includes a comment about optionally defining `$env:FOUNT_DIR` to specify the installation directory. This provides a straightforward way to install Fount on Windows. ```powershell # 若需要,定义环境变量 $env:FOUNT_DIR 来指定 fount 目录 irm https://raw.githubusercontent.com/steve02081504/fount/refs/heads/master/src/runner/main.ps1 | iex ``` -------------------------------- ### Cross-Platform Package Installation Function (Bash) Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.ko-KR.md This Bash function, `install_package`, attempts to install a specified package using various package managers (pkg, snap, apt-get, brew, pacman, dnf, yum, zypper, apk). It checks for existing installations and updates a global variable `INSTALLED_PACKAGES` upon successful installation. The function returns 0 on success and 1 on failure. ```bash install_package() { package_name="$1"; install_successful=0; if command -v "$package_name" >/dev/null 2>&1; then return 0; fi; if command -v pkg >/dev/null 2>&1; then pkg install -y "$package_name" && install_successful=1; fi; if [ "$install_successful" -eq 0 ] && command -v snap >/dev/null 2>&1; then snap install "$package_name" && install_successful=1; fi; if [ "$install_successful" -eq 0 ] && command -v apt-get >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo apt-get update; sudo apt-get install -y "$package_name" && install_successful=1; else apt-get update; apt-get install -y "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v brew >/dev/null 2>&1; then if ! brew list --formula "$package_name" >/dev/null 2>&1; then brew install "$package_name" && install_successful=1; else install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v pacman >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo pacman -Syy; sudo pacman -S --needed --noconfirm "$package_name" && install_successful=1; else pacman -Syy; pacman -S --needed --noconfirm "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v dnf >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo dnf install -y "$package_name" && install_successful=1; else dnf install -y "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v yum >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo yum install -y "$package_name" && install_successful=1; else yum install -y "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v zypper >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo zypper install -y --no-confirm "$package_name" && install_successful=1; else zypper install -y --no-confirm "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v apk >/dev/null 2>&1; then apk add --update "$package_name" && install_successful=1; fi; if [ "$install_successful" -eq 1 ]; then if [ -z "$INSTALLED_PACKAGES" ]; then INSTALLED_PACKAGES="$package_name"; else INSTALLED_PACKAGES="$INSTALLED_PACKAGES;$package_name"; fi; return 0; else echo "Error: $package_name installation failed." >&2; return 1; fi; } ``` -------------------------------- ### Installing Core Dependencies with `install_package` (Shell) Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.es-ES.md This snippet demonstrates the usage of the `install_package` function to install `curl` and `bash`. These packages are likely prerequisites for subsequent installation steps or core functionalities of the Fount platform. ```Shell install_package curl; install_package bash ``` -------------------------------- ### Automated Cross-Platform Package Installation and Fount Runner Execution (Bash) Source: https://github.com/steve02081504/fount/blob/master/readme.md This script defines a robust 'install_package' function that attempts to install a given package using various system package managers (e.g., apt-get, brew, dnf, snap, yum, zypper, apk). After defining the function, it uses it to install 'curl' and 'bash', exports a list of installed packages, downloads the 'fount' project's 'main.sh' runner script, executes it, and finally sources the user's '.profile'. ```bash INSTALLED_PACKAGES="${FOUNT_AUTO_INSTALLED_PACKAGES:-}" install_package() { package_name="$1"; install_successful=0; if command -v "$package_name" >/dev/null 2>&1; then return 0; fi; if command -v pkg >/dev/null 2>&1; then pkg install -y "$package_name" && install_successful=1; fi; if [ "$install_successful" -eq 0 ] && command -v snap >/dev/null 2>&1; then snap install "$package_name" && install_successful=1; fi; if [ "$install_successful" -eq 0 ] && command -v apt-get >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo apt-get update; sudo apt-get install -y "$package_name" && install_successful=1; else apt-get update; apt-get install -y "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v brew >/dev/null 2>&1; then if ! brew list --formula "$package_name" >/dev/null 2>&1; then brew install "$package_name" && install_successful=1; else install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v pacman >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo pacman -Syy; sudo pacman -S --needed --noconfirm "$package_name" && install_successful=1; else pacman -Syy; pacman -S --needed --noconfirm "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v dnf >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo dnf install -y "$package_name" && install_successful=1; else dnf install -y "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v yum >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo yum install -y "$package_name" && install_successful=1; else yum install -y "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v zypper >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1; then sudo zypper install -y --no-confirm "$package_name" && install_successful=1; else zypper install -y --no-confirm "$package_name" && install_successful=1; fi; fi; if [ "$install_successful" -eq 0 ] && command -v apk >/dev/null 2>&1; then apk add --update "$package_name" && install_successful=1; fi; if [ "$install_successful" -eq 1 ]; then if [ -z "$INSTALLED_PACKAGES" ]; then INSTALLED_PACKAGES="$package_name"; else INSTALLED_PACKAGES="$INSTALLED_PACKAGES;$package_name"; fi; return 0; else echo "Error: $package_name installation failed." >&2; return 1; fi; } install_package curl; install_package bash export FOUNT_AUTO_INSTALLED_PACKAGES="$INSTALLED_PACKAGES" curl -fsSL https://raw.githubusercontent.com/steve02081504/fount/refs/heads/master/src/runner/main.sh | bash . "$HOME/.profile" ``` -------------------------------- ### Previewing and Manually Installing Fount with PowerShell Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.it-IT.md This PowerShell snippet first downloads the Fount installation script content into a variable. It then defines a temporary function `fountInstaller` containing the script content and finally executes this function with the `init` argument. This method allows for inspection of the script content before execution or for more controlled installation scenarios. ```PowerShell $scriptContent = Invoke-RestMethod https://raw.githubusercontent.com/steve02081504/fount/refs/heads/master/src/runner/main.ps1 Invoke-Expression "function fountInstaller { $scriptContent }" fountInstaller init ``` -------------------------------- ### Pulling Fount Docker Image (Bash) Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.en-UK.md This command pulls the official fount Docker image from GitHub Container Registry, allowing users to run fount within a containerized environment. This provides an isolated and consistent setup. ```Bash docker pull ghcr.io/steve02081504/fount ``` -------------------------------- ### Installing Fount via Remote Bash Script - Bash Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.de-DE.md This command downloads and executes the Fount installation script directly from GitHub using `curl` and pipes it to `bash`. The `-s init` argument is passed to the script, likely triggering an initialization process for Fount. This is a common method for quick, direct installation of command-line tools. ```Bash curl -fsSL https://raw.githubusercontent.com/steve02081504/fount/refs/heads/master/src/runner/main.sh | bash -s init ``` -------------------------------- ### Initializing INSTALLED_PACKAGES for Dry Run - Bash Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.en-UK.md This snippet initializes the 'INSTALLED_PACKAGES' shell variable. It sets its value to the current value of the 'FOUNT_AUTO_INSTALLED_PACKAGES' environment variable, or an empty string if the environment variable is not set or is null. This is typically used for a 'dry run' or initial setup. ```bash INSTALLED_PACKAGES="${FOUNT_AUTO_INSTALLED_PACKAGES:-}" ``` -------------------------------- ### Sourcing User Profile for Environment Updates (Bash) Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.ko-KR.md This command sources the user's `.profile` file, which is crucial for applying any environment variable changes or path updates made by the script to the current shell session. This ensures that newly installed tools or configured paths are immediately accessible. ```bash . "$HOME/.profile" ``` -------------------------------- ### Direct Fount Installation via PowerShell Remote Script Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.ru-RU.md This PowerShell command downloads the `main.ps1` script from the fount GitHub repository using `Invoke-RestMethod` (`irm`) and executes it directly using `Invoke-Expression` (`iex`). It includes a comment suggesting that the `$env:FOUNT_DIR` environment variable can be optionally defined to specify the fount installation directory. This provides a simple, one-line installation method for Windows users. ```powershell # При необходимости определите переменную среды $env:FOUNT_DIR, чтобы указать каталог fount irm https://raw.githubusercontent.com/steve02081504/fount/refs/heads/master/src/runner/main.ps1 | iex ``` -------------------------------- ### Sourcing User Profile (Bash) Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.ko-KR.md This command sources the user's `.profile` file, typically located in the home directory. Sourcing this file ensures that any environment variables, aliases, or functions defined within it, including those set by the Fount installer, are loaded into the current shell session. ```bash . "$HOME/.profile" ``` -------------------------------- ### Sourcing User Profile (Shell) Source: https://github.com/steve02081504/fount/blob/master/readme.md This command sources the user's `.profile` file, which typically contains environment variable definitions and startup commands. Sourcing it ensures that any changes made by the Fount installer, such as adding Fount to the PATH, are immediately applied to the current shell session. ```Shell . "$HOME/.profile" ``` -------------------------------- ### Sourcing User Profile for Environment Updates - Bash Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.ja-JP.md This command sources the user's `.profile` file, which is commonly used to load environment variables and path configurations. Sourcing it ensures that any Fount-related settings are applied to the current shell session. ```Bash . "$HOME/.profile" ``` -------------------------------- ### Installing Core Dependencies and Exporting Installed Packages in Bash Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.ru-RU.md These commands utilize the `install_package` function to install `curl` and `bash`, which are likely core dependencies for the fount platform. After installation attempts, the `FOUNT_AUTO_INSTALLED_PACKAGES` environment variable is exported, containing a semicolon-separated list of successfully installed packages. ```bash install_package curl; install_package bash export FOUNT_AUTO_INSTALLED_PACKAGES="$INSTALLED_PACKAGES" ``` -------------------------------- ### Installing Core Dependencies (Bash) Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.it-IT.md These commands utilize the `install_package` function to ensure that `curl` and `bash` are installed on the system. These packages are likely prerequisites for further Fount installation steps, ensuring the environment is ready for script execution and content retrieval. ```Bash install_package curl; install_package bash ``` -------------------------------- ### Removing Fount (Bash) Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.en-UK.md This command initiates the removal process for the fount platform. It is designed to gracefully uninstall fount and clean up associated files and configurations. ```Bash fount remove ``` -------------------------------- ### Removing Fount Installation Source: https://github.com/steve02081504/fount/blob/master/docs/Readme.fr-FR.md This command executes the 'fount' utility with the 'remove' argument. This is the standard way to uninstall or clean up the 'fount' installation from the system. ```Bash fount remove ```