From c68dffa6c42334cfa939fb21a5430a35abff08c0 Mon Sep 17 00:00:00 2001 From: merakor Date: Wed, 13 May 2020 19:51:21 +0000 Subject: contrib: use --help and -h for usage information FossilOrigin-Name: 43f55b077d3feb3e4bc42d72a58cadedbe7f387cedf01d2e59308c35f6afb484 --- contrib/kiss-cargo-urlgen | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'contrib/kiss-cargo-urlgen') diff --git a/contrib/kiss-cargo-urlgen b/contrib/kiss-cargo-urlgen index 4229062..52a10eb 100755 --- a/contrib/kiss-cargo-urlgen +++ b/contrib/kiss-cargo-urlgen @@ -1,9 +1,6 @@ #!/bin/sh # Create static cargo sources for Rust packages -[ "$1" ] || { - printf '\033[1;33m-> \033[musage: kiss-cargo-urlgen [crate+ver] [crate+ver]\n' - exit 1 -} +case "$1" in ''|--help|-h) printf '\033[1;33m-> \033[m%s\n' "usage: ${0##*/} [crate+ver] [crate+ver]"; exit 0 ; esac # We convert the name-version seperator from '+' to '-' to # avoid issues that may arise from version numbers that include -- cgit v1.2.3