From ceca768ee613e7e759593e0cf9cd33f638e71d99 Mon Sep 17 00:00:00 2001 From: Nate Case Date: Tue, 23 Mar 2010 19:27:41 +0100 Subject: 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 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 -- cgit v0.10.2-6-g49f6