From a15fd48016014249a13db7a437b5e4f5937f6158 Mon Sep 17 00:00:00 2001 From: "Jason St. John" Date: Fri, 8 Nov 2013 02:53:33 -0500 Subject: Improve --help switch output for pacman contrib and pacman scripts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Unify the formatting of the --help switch for pacman utils, if it exists. All of the pacman utils will now output help text using the following format: util-name (pacman) v one line description of util's purpose Usage: util-name [options] -b, --bar whatever --bar does -f, --foo whatever --foo does -h, --help display this help message Reported-by: Karol Błażewicz Signed-off-by: Jason St. John --- contrib/checkupdates.sh.in | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'contrib/checkupdates.sh.in') diff --git a/contrib/checkupdates.sh.in b/contrib/checkupdates.sh.in index 48ceff94..413b78ac 100644 --- a/contrib/checkupdates.sh.in +++ b/contrib/checkupdates.sh.in @@ -18,10 +18,17 @@ # along with this program. If not, see . # +declare -r myname='checkupdates' +declare -r myver='@PACKAGE_VERSION@' + if (( $# > 0 )); then - echo "checkupdates: Safely print a list of pending updates." - echo "Use: checkupdates" - echo "Export the 'CHECKUPDATES_DB' variable to change the path of the temporary database." + echo "${myname} (pacman) v${myver}" + echo + echo "Safely print a list of pending updates" + echo + echo "Usage: ${myname}" + echo + echo 'Note: Export the "CHECKUPDATES_DB" variable to change the path of the temporary database.' exit 0 fi -- cgit v1.2.3-70-g09d2