refactor: update help options and improve config file handling

This commit is contained in:
Daniel Akulenok
2026-04-08 22:45:43 +02:00
parent 1cb72a0ca5
commit 3554cdc44d
3 changed files with 93 additions and 142 deletions

View File

@@ -170,25 +170,19 @@ Imports GPG keys for verifying Debian and Ubuntu repository signatures. Requires
- Requires `~/.gnupg/` to exist
- Keyserver can be customized via `GPG_KEYSERVER` in config
### Options
### Help
#### `-c <path>` — Specify config file
#### `help`, `-h`, `--help` — Show usage
```bash
./aptly-mirror.sh -c /etc/aptly-mirror.conf update
./aptly-mirror.sh help
```
Config file search order (if `-c` not specified):
Config file search order:
1. `$APTLY_MIRROR_CONF` environment variable
2. `./aptly-mirror.conf` (same directory as script)
3. `/etc/aptly-mirror.conf`
#### `-h`, `--help` — Show usage
```bash
./aptly-mirror.sh --help
```
### Configuration
All settings are in `aptly-mirror.conf`. See the included example for detailed comments.