-
-
Notifications
You must be signed in to change notification settings - Fork 45
How to install Toshy with a single command
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.
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.
-
Set URL and Filename: The
URLvariable is set to the location of the GitHub zip file, andFNis 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)"-
Change Directory: Changes to the
~/Downloadsdirectory to manage file downloads.
cd ~/Downloads-
Download File: Attempts to download the latest zip file using
curl. Ifcurlis not available, it useswget. 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; }-
Create Directory and Extract: Creates a directory with the same name as the timestamped file and uses
unzipto extract the zip file contents into this directory. If there's nounzipcommand 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; } -
Navigate and Install: Changes into the directory containing the extracted project files (
toshy-mainwithin the timestamped folder) and runs the installation script.
cd "$FN/toshy-main" && (./setup_toshy.py install || echo "Setup script execution failed.")