diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/oe-setup-rpmrepo | 28 |
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. |
24 | TMPDIR="$OE_TMPDIR" | 24 | TMPDIR="$OE_TMPDIR" |
25 | 25 | ||
26 | function usage() { | ||
27 | echo "Usage: $0 <rpm-dir>" | ||
28 | echo " <rpm-dir>: default is $TMPDIR/deploy/rpm" | ||
29 | } | ||
30 | |||
31 | if [ $# -gt 1 ]; then | ||
32 | usage | ||
33 | exit 1 | ||
34 | fi | ||
35 | |||
36 | setup_tmpdir() { | 26 | setup_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 | ||
46 | setup_tmpdir | ||
47 | |||
48 | function 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 | |||
58 | if [ $# -gt 1 -o "$1" = '--help' -o "$1" = '-h' ]; then | ||
59 | usage | ||
60 | exit 2 | ||
61 | fi | ||
62 | |||
56 | setup_sysroot() { | 63 | setup_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 | ||
71 | setup_tmpdir | ||
72 | setup_sysroot | 78 | setup_sysroot |
73 | 79 | ||
74 | 80 | ||