Commit f2b24502 authored by Vitaly Lipatov's avatar Vitaly Lipatov

distr_info: resort functions

parent e053ec73
......@@ -591,9 +591,6 @@ fi
}
fill_distr_info
[ -n "$DISTRIB_ID" ] || DISTRIB_ID="Generic"
get_uname()
{
tolower "$(uname $1)" | tr -d " \t\r\n"
......@@ -896,6 +893,43 @@ Distro name / version (--distro-name/version): $DISTRO_NAME / $DISTRIB_FULL_RELE
EOF
}
print_help()
{
echo "distro_info v$PROGVERSION - distro information retriever"
echo "Usage: distro_info [options] [SystemName/Version]"
echo "Options:"
echo " -h | --help - this help"
echo " -a - print hardware architecture (--distro-arch for distro depended name)"
echo " -b - print size of arch bit (32/64)"
echo " -c - print number of CPU cores"
echo " -i - print virtualization type"
echo " -m - print system memory size (in MB)"
echo " -y|--service-manager - print running service manager"
echo " -z - print current CPU MHz"
echo " --glibc-version - print system glibc version"
echo
echo " -d|--base-distro-name - print distro id (short distro name)"
echo " -e - print full name of distro with version"
echo " -o | --os-name - print base OS name"
echo " -p | --package-type - print type of the packaging system"
echo " -g - print name of the packaging system"
echo " -s|-n|--vendor-name - print name of the distro family (vendor name) (ubuntu for all Ubuntu family, alt for all ALT family) (see _vendor macros in rpm)"
echo " --pretty|--pretty-name - print pretty distro name"
echo " -v | --base-version - print version of the distro"
echo " --distro-name - print distro name"
echo " --distro-version - print full version of the distro"
echo " --full-version - print full version of the distro"
echo " --codename (obsoleted) - print distro codename (focal for Ubuntu 20.04)"
echo " -r|--repo-name - print repository name (focal for Ubuntu 20.04)"
echo " --build-id - print a string uniquely identifying the system image originally used as the installation base"
echo " -V - print the utility version"
echo "Run without args to print all information."
}
fill_distr_info
[ -n "$DISTRIB_ID" ] || DISTRIB_ID="Generic"
case "$2" in
-*)
echo "Unsupported option $2" >&2
......@@ -905,35 +939,7 @@ esac
case "$1" in
-h|--help)
echo "distro_info v$PROGVERSION - distro information retriever"
echo "Usage: distro_info [options] [SystemName/Version]"
echo "Options:"
echo " -h | --help - this help"
echo " -a - print hardware architecture (--distro-arch for distro depended name)"
echo " -b - print size of arch bit (32/64)"
echo " -c - print number of CPU cores"
echo " -i - print virtualization type"
echo " -m - print system memory size (in MB)"
echo " -y|--service-manager - print running service manager"
echo " -z - print current CPU MHz"
echo " --glibc-version - print system glibc version"
echo
echo " -d|--base-distro-name - print distro id (short distro name)"
echo " -e - print full name of distro with version"
echo " -o | --os-name - print base OS name"
echo " -p | --package-type - print type of the packaging system"
echo " -g - print name of the packaging system"
echo " -s|-n|--vendor-name - print name of the distro family (vendor name) (ubuntu for all Ubuntu family, alt for all ALT family) (see _vendor macros in rpm)"
echo " --pretty|--pretty-name - print pretty distro name"
echo " -v | --base-version - print version of the distro"
echo " --distro-name - print distro name"
echo " --distro-version - print full version of the distro"
echo " --full-version - print full version of the distro"
echo " --codename (obsoleted) - print distro codename (focal for Ubuntu 20.04)"
echo " -r|--repo-name - print repository name (focal for Ubuntu 20.04)"
echo " --build-id - print a string uniquely identifying the system image originally used as the installation base"
echo " -V - print the utility version"
echo "Run without args to print all information."
print_help
exit 0
;;
-p|--package-type)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment