bin/xbps-uhelper: format usage like other xbps binaries

This commit is contained in:
Duncan Overbruck 2023-02-11 21:32:36 +01:00
parent e0317cc6d7
commit be2525adc0
No known key found for this signature in database
GPG Key ID: 335C1D17EC3D6E35

View File

@ -41,34 +41,30 @@ static void __attribute__((noreturn))
usage(void) usage(void)
{ {
fprintf(stdout, fprintf(stdout,
"usage: xbps-uhelper [options] [action] [args]\n" "Usage: xbps-uhelper [OPTIONS] [MODE] [ARGUMENTS]\n\n"
"\n" "OPTIONS\n"
" Available actions:\n" " -C --config <dir> Path to confdir (xbps.d)\n"
" binpkgarch, binpkgver, cmpver, getpkgdepname,\n" " -d --debug Debug mode shown to stderr\n"
" getpkgname, getpkgrevision, getpkgversion, pkgmatch, version,\n" " -r --rootdir <dir> Full path to rootdir\n"
" real-version, arch, getsystemdir, getname, getversion\n" " -V --version Show XBPS verison\n"
"\n" "\n"
" Action arguments:\n" "MODE\n"
" binpkgarch <binpkg> ...\n" " arch Prints the configured XBPS architecture\n"
" binpkgver <binpkg> ...\n" " binpkgarch <binpkg...> Prints the architecture of binpkg names\n"
" cmpver <instver> <reqver>\n" " binpkgver <binpkg...> Prints the pkgver of binpkg names\n"
" getpkgdepname <string> ...\n" " cmpver <version> <version> Compare two version strings\n"
" getpkgdepversion <string> ...\n" " getname <pkgver|dep...> Prints pkgname from pkgvers or dependencies\n"
" getpkgname <string> ...\n" " getpkgdepname <dep...> Prints pkgname from dependencies\n"
" getpkgrevision <string> ...\n" " getpkgdepversion <dep...> Prints version constraint from dependencies\n"
" getpkgversion <string> ...\n" " getpkgname <pkgver...> Prints pkgname from pkgvers\n"
" getname <string> ...\n" " getpkgrevision <pkgver...> Prints revision from pkgvers\n"
" getversion <string> ...\n" " getpkgversion <pkgver...> Prints version from pkgvers\n"
" pkgmatch <pkg-version> <pkg-pattern>\n" " getversion <pkgver|dep...> Prints version from patterns or pkgvers\n"
" version <pkgname> ...\n" " pkgmatch <pkgver> <dep> Match pkgver against dependency\n"
" real-version <pkgname> ...\n" " real-version <pkgname...> Prints version of installed real packages\n"
"\n" " version <pkgname...> Prints version of installed packages\n"
" Options shared by all actions:\n" " getsystemdir Prints the system xbps.d directory\n"
" -C, --config Path to xbps.conf file.\n" );
" -d, --debug Debugging messages to stderr.\n"
" -r, --rootdir <rootdir>\n"
" -V, --version Prints the xbps release version\n");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }