[proxy] github.com← back | site home | direct (HTTPS) ↗ | proxy home | ◑ dark◐ light

How to install Toshy with a single command

RedBearAK

New simplified command using bootstrap script

Copy and paste this into a terminal for a one-command install:

bash -c "$(curl -L https://raw.githubusercontent.com/RedBearAK/toshy/main/scripts/bootstrap.sh || wget -O - https://raw.githubusercontent.com/RedBearAK/toshy/main/scripts/bootstrap.sh)"

The bootstrap script that this downloads and executes will give you the opportunity to pick a different branch to install from (if desired) and also allows for providing the usual installation options/flags you might want to use if you had downloaded the zip file yourself. Most users will find the default choices just fine.


Older command with no bootstrap script (still works)

Quick install command (no options)

Copy and paste this into a terminal for a one-command install:

URL="https://github.com/RedBearAK/toshy/archive/refs/heads/main.zip" && FN="toshy_$(date +%Y%m%d_%H%M)" && cd ~/Downloads && (curl -L "$URL" -o "$FN.zip" || wget "$URL" -O "$FN.zip" || { echo "Download failed."; exit 1; }) && mkdir -p "$FN" && unzip -o "$FN.zip" -d "$FN" || { echo "Extract failed. No unzip command?"; exit 1; } && cd "$FN/toshy-main" && (./setup_toshy.py install || echo "Setup script execution failed.")

Or, here is the same command using backslashes to separate it into different lines:

URL="https://github.com/RedBearAK/toshy/archive/refs/heads/main.zip" && \
FN="toshy_$(date +%Y%m%d_%H%M)" && \
cd ~/Downloads && \
(curl -L "$URL" -o "$FN.zip" || \
 wget "$URL" -O "$FN.zip" || \
 { echo "Download failed."; exit 1; }) && \
mkdir -p "$FN" && \
unzip -o "$FN.zip" -d "$FN" || \
{ echo "Extract failed. No unzip command?"; exit 1; } && \
cd "$FN/toshy-main" && \
(./setup_toshy.py install || echo "Setup script execution failed.")

This single command doesn't give you a chance to use any of the installer options, but if it doesn't work you can still re-run the downloaded installer again with appropriate options. See below for details about what each part of the command does.

Explanation of the command sections

  1. Set URL and Filename: The URL variable is set to the location of the GitHub zip file, and FN is set to a timestamped filename to ensure uniqueness for each run of the quick install command.
URL="https://github.com/RedBearAK/toshy/archive/refs/heads/main.zip" && FN="toshy_$(date +%Y%m%d_%H%M)"
  1. Change Directory: Changes to the ~/Downloads directory to manage file downloads.
cd ~/Downloads
  1. Download File: Attempts to download the latest zip file using curl. If curl is not available, it uses wget. An error message is displayed if both methods fail.
curl -L "$URL" -o "$FN.zip" || wget "$URL" -O "$FN.zip" || { echo "Download failed."; exit 1; }
  1. Create Directory and Extract: Creates a directory with the same name as the timestamped file and uses unzip to extract the zip file contents into this directory. If there's no unzip command on the system, this will fail and show the error message.
mkdir -p "$FN" && unzip -o "$FN.zip" -d "$FN" || { echo "Extract failed. No unzip command?"; exit 1; } 
  1. Navigate and Install: Changes into the directory containing the extracted project files (toshy-main within the timestamped folder) and runs the installation script.
cd "$FN/toshy-main" && (./setup_toshy.py install || echo "Setup script execution failed.")