From: Ed Bartosh <ed.bartosh@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] oe-setup-rpmrepo: standardize usage output
Date: Fri, 9 Dec 2016 16:19:05 +0200 [thread overview]
Message-ID: <1481293145-7680-1-git-send-email-ed.bartosh@linux.intel.com> (raw)
Made usage output of oe-setup-rpmrepo to look similar to the
output of other oe scripts.
[YOCTO #10751]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
scripts/oe-setup-rpmrepo | 28 +++++++++++++++++-----------
1 file changed, 17 insertions(+), 11 deletions(-)
diff --git a/scripts/oe-setup-rpmrepo b/scripts/oe-setup-rpmrepo
index 917b98b..7dcded8 100755
--- a/scripts/oe-setup-rpmrepo
+++ b/scripts/oe-setup-rpmrepo
@@ -23,16 +23,6 @@
# Instead, use OE_TMPDIR for passing this in externally.
TMPDIR="$OE_TMPDIR"
-function usage() {
- echo "Usage: $0 <rpm-dir>"
- echo " <rpm-dir>: default is $TMPDIR/deploy/rpm"
-}
-
-if [ $# -gt 1 ]; then
- usage
- exit 1
-fi
-
setup_tmpdir() {
if [ -z "$TMPDIR" ]; then
# Try to get TMPDIR from bitbake
@@ -53,6 +43,23 @@ setup_tmpdir() {
fi
}
+setup_tmpdir
+
+function usage() {
+ echo 'Usage: oe-setup-rpmrepo rpm-dir'
+ echo ''
+ echo 'OpenEmbedded setup-rpmrepo - setup rpm repository'
+ echo ''
+ echo 'arguments:'
+ echo " rpm-dir rpm repo directory, default is $TMPDIR/deploy/rpm"
+ echo ''
+}
+
+if [ $# -gt 1 -o "$1" = '--help' -o "$1" = '-h' ]; then
+ usage
+ exit 2
+fi
+
setup_sysroot() {
# Toolchain installs set up $OECORE_NATIVE_SYSROOT in their
# environment script. If that variable isn't set, we're
@@ -68,7 +75,6 @@ setup_sysroot() {
fi
}
-setup_tmpdir
setup_sysroot
--
2.1.4
reply other threads:[~2016-12-09 14:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1481293145-7680-1-git-send-email-ed.bartosh@linux.intel.com \
--to=ed.bartosh@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox