aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-03-13 13:57:38 -0400
committerMike Frysinger <vapier@gentoo.org>2009-03-13 13:57:38 -0400
commite3a999ce328e64490a43545fda85a2f05177f477 (patch)
tree82a1e0aab8eef27090194a160920c3d79428b685 /wrappers/cross-fix-root
parentsite: sync with openembedded (diff)
downloadcrossdev-e3a999ce328e64490a43545fda85a2f05177f477.tar.gz
crossdev-e3a999ce328e64490a43545fda85a2f05177f477.tar.bz2
crossdev-e3a999ce328e64490a43545fda85a2f05177f477.zip
cross-fix-root: let people specify paths via cmdline
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'wrappers/cross-fix-root')
-rwxr-xr-xwrappers/cross-fix-root16
1 files changed, 12 insertions, 4 deletions
diff --git a/wrappers/cross-fix-root b/wrappers/cross-fix-root
index c4fb422..08e1df0 100755
--- a/wrappers/cross-fix-root
+++ b/wrappers/cross-fix-root
@@ -21,10 +21,18 @@ if [ -n "${ROOTDIR}" ] ; then
CROSS_BINDIR="${ROOTDIR}/tools"
fi
CROSS_PREFIX=${CROSS_COMPILE}
-if [ -n "$1" ] && [ -e "/usr/$1" ] ; then
- SYSROOT="/usr/$1"
- CROSS_BINDIR="/usr/bin"
- CROSS_PREFIX="$1-"
+if [ -n "$3" ] ; then
+ SYSROOT="$1"
+ CROSS_BINDIR="$2"
+ CROSS_PREFIX="$3"
+elif [ -n "$1" ] ; then
+ if [ -e "/usr/$1" ] ; then
+ SYSROOT="/usr/$1"
+ CROSS_BINDIR="/usr/bin"
+ CROSS_PREFIX="$1-"
+ else
+ exit 1
+ fi
fi
cd "${SYSROOT}" || exit 0