📱 For the full interactive experience, visit shellscript.download
load.sh load
load.sh: Fetch a script from https://shellscript.download, cache it locally,
and optionally execute it.
Cache location used by this script:
$HOME/.shellscript/downloads/<script>.sh
Usage:
load.sh [--update] [--dont-run] <script> [optional args...]
Options:
--update Force re-download/update of the script even if it exists locally
--dont-run Do not execute the script after ensuring it is downloaded
--developer <path> Use a local directory instead of downloading (for development)
-h, --help Show this help message
Arguments:
<script> The script name (without .sh) to fetch from shellscript.download
[args...] Optional arguments to pass through to the downloaded script
To update the loader to a new version, reinstall it via the installer:
/bin/bash -c "$(curl -fsSL https://shellscript.download/install/loader)"
Notes about environment setup:
The installer (install/loader) may create and manage additional directories such as
$HOME/.shellscript/shellrc (for auto-loading during shell init) and
$HOME/.shellscript/bin (added to PATH). This load.sh script itself only ensures
the cache directory $HOME/.shellscript/downloads and uses it to store scripts.
Behavior:
- If the cached file is missing at "$HOME/.shellscript/downloads/<script>.sh" OR
if --update is passed, the script is downloaded from the remote URL.
- After ensuring the cached script exists, it is executed with remaining arguments
unless --dont-run is provided.
- Exits with the same code as the executed script when run.