summaryrefslogtreecommitdiffstats
path: root/scripts/oe-setup-rpmrepo
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-12-09 16:19:05 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-13 22:55:20 +0000
commit78087eba73ea073398f7d7457a5722da0c8b3001 (patch)
tree3acabdc305642c62c0f3bd6188d7e2b11f916038 /scripts/oe-setup-rpmrepo
parenteb78c9cd2cf6be02bf5ea84f456d8711c30482b1 (diff)
downloadpoky-78087eba73ea073398f7d7457a5722da0c8b3001.tar.gz
oe-setup-rpmrepo: standardize usage output
Made usage output of oe-setup-rpmrepo to look similar to the output of other oe scripts. [YOCTO #10751] (From OE-Core rev: 5423c9a412c680b781417a64b412838845b5d075) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/oe-setup-rpmrepo')
-rwxr-xr-xscripts/oe-setup-rpmrepo28
1 files changed, 17 insertions, 11 deletions
diff --git a/scripts/oe-setup-rpmrepo b/scripts/oe-setup-rpmrepo
index 917b98b984..7dcded8f1d 100755
--- a/scripts/oe-setup-rpmrepo
+++ b/scripts/oe-setup-rpmrepo
@@ -23,16 +23,6 @@
23# Instead, use OE_TMPDIR for passing this in externally. 23# Instead, use OE_TMPDIR for passing this in externally.
24TMPDIR="$OE_TMPDIR" 24TMPDIR="$OE_TMPDIR"
25 25
26function usage() {
27 echo "Usage: $0 <rpm-dir>"
28 echo " <rpm-dir>: default is $TMPDIR/deploy/rpm"
29}
30
31if [ $# -gt 1 ]; then
32 usage
33 exit 1
34fi
35
36setup_tmpdir() { 26setup_tmpdir() {
37 if [ -z "$TMPDIR" ]; then 27 if [ -z "$TMPDIR" ]; then
38 # Try to get TMPDIR from bitbake 28 # Try to get TMPDIR from bitbake
@@ -53,6 +43,23 @@ setup_tmpdir() {
53 fi 43 fi
54} 44}
55 45
46setup_tmpdir
47
48function usage() {
49 echo 'Usage: oe-setup-rpmrepo rpm-dir'
50 echo ''
51 echo 'OpenEmbedded setup-rpmrepo - setup rpm repository'
52 echo ''
53 echo 'arguments:'
54 echo " rpm-dir rpm repo directory, default is $TMPDIR/deploy/rpm"
55 echo ''
56}
57
58if [ $# -gt 1 -o "$1" = '--help' -o "$1" = '-h' ]; then
59 usage
60 exit 2
61fi
62
56setup_sysroot() { 63setup_sysroot() {
57 # Toolchain installs set up $OECORE_NATIVE_SYSROOT in their 64 # Toolchain installs set up $OECORE_NATIVE_SYSROOT in their
58 # environment script. If that variable isn't set, we're 65 # environment script. If that variable isn't set, we're
@@ -68,7 +75,6 @@ setup_sysroot() {
68 fi 75 fi
69} 76}
70 77
71setup_tmpdir
72setup_sysroot 78setup_sysroot
73 79
74 80