summaryrefslogtreecommitdiff
path: root/scripts/populate.in
diff options
context:
space:
mode:
authorNate Case <ncase@xes-inc.com>2010-03-23 18:27:41 (GMT)
committerNate Case <ncase@xes-inc.com>2010-03-23 18:27:41 (GMT)
commitceca768ee613e7e759593e0cf9cd33f638e71d99 (patch)
tree6bd118aad4d3a36f24533342fa73b37dba703017 /scripts/populate.in
parenta8979d911f197bfd2a00691b2e12750c1678a4cd (diff)
scripts/populate: add option to use an alternate sysroot
Add a new command line option, "-r", which allows the user to specify an alternate sysroot location to copy libraries from. This is useful when using the toolchain in combination with a separate root filesystem, or when working with multiple different root filesystems. Signed-off-by: Nate Case <ncase@xes-inc.com>
Diffstat (limited to 'scripts/populate.in')
-rw-r--r--scripts/populate.in10
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/populate.in b/scripts/populate.in
index 5dbe313..e263475 100644
--- a/scripts/populate.in
+++ b/scripts/populate.in
@@ -38,6 +38,9 @@ OPTIONS
-d dst_dir
use 'dst_dir' as the place to put the populated root directory
+ -r sysroot_dir
+ use 'sysroot_dir' as the sysroot instead of the toolchain default
+
-l name1[:name2[...]]
Always add the specified shared library/ies name1, name2... from the
toolchain (in the sys-root). Actual library names are searched as
@@ -71,10 +74,11 @@ CT_LIB_FILE=
CT_FORCE=no
CT_PRINTF=:
OPTIND=1
-while getopts ":s:d:l:L:fvh" CT_OPT; do
+while getopts ":s:d:r:l:L:fvh" CT_OPT; do
case "${CT_OPT}" in
s) CT_ROOT_SRC_DIR="${OPTARG}";;
d) CT_ROOT_DST_DIR="${OPTARG}";;
+ r) CT_SYSROOT_DIR="${OPTARG}";;
l) CT_LIB_LIST="${CT_LIB_LIST}:${OPTARG}";;
L) CT_LIB_FILE="${OPTARG}";;
f) CT_FORCE=y;;
@@ -100,6 +104,10 @@ if [ ! -d "${CT_ROOT_SRC_DIR}" ]; then
echo "$myname: '${CT_ROOT_SRC_DIR}': no such file or directory"
exit 1
fi
+if [ ! -d "${CT_SYSROOT_DIR}" ]; then
+ echo "$myname: '${CT_SYSROOT_DIR}': no such file or directory"
+ exit 1
+fi
if [ -d "${CT_ROOT_DST_DIR}" -a "${CT_FORCE}" != "y" ]; then
echo "$myname: '${CT_ROOT_DST_DIR}': already exists"
exit 1