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