CLI Tool
The command-line tool hustmirror-cli is a small utility that helps you quickly switch software sources.
It has the following features:
- One-click replacement of software sources
- Restoration of replaced software sources
- Online updates
The supported software/systems are indicated using in the main page list.
You can select your requirements from the hyperlinks below to get started quickly.
This command-line tool is written in POSIX shell-compatible syntax.
The declared interpreter is sh
from the PATH
, and it has been tested in both the dash and bash interpreters.
Bash and POSIX Shell mentioned in this document are shell environments for running and downloading online.
When using it online, since the POSIX Shell method uses pipes that occupy stdin and cannot receive user input, it is recommended to use the Bash method.
Automatic Deployment
The tool detects whether there are deployable systems/software sources. If deployable sources are found, it proceeds with automatic deployment.
Add -y
option to skip confirmation, using default settings.
- Online
- Installed
curl -sSfL https://mirrors.hust.edu.cn/get | sh -s -- autodeploy # or use 'ad'
hustmirror-cli autodeploy # or use 'ad'
Running in Interactive Mode
- Online
- Installed
curl -sSfL https://mirrors.hust.edu.cn/get | sh -s -- -i
hustmirror-cli -i
Restore origin configurations
- Online
- Installed
curl -sSfL https://mirrors.hust.edu.cn/get | sh -s -- recover
hustmirror-cli recover
Installing / Updating
After installing the tool via a command, you can use the 'hustmirror-cli' command to replace/restore mirror sources at any time. This command can also be used for manual online updates of the installed tool.
- Online
- Installed
curl -sSfL https://mirrors.hust.edu.cn/get | sh -s -- install
hustmirror-cli install
Getting Detailed Help
Besides above, this cli tool support other features such as deploy/recover specific softwares.
To view the basic help for the tool, you can use:
- Online
- Installed
curl -sSfL https://mirrors.hust.edu.cn/get | sh -s -- help # View basic help
hustmirror-cli help # View basic help
For subcommands or specific topics like the deploy
command, you can use:
- Online
- Installed
curl -sSfL https://mirrors.hust.edu.cn/get | sh -s -- help deploy # View help for a specific topic
hustmirror-cli help deploy # View help for a specific topic