diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2007-07-14 13:09:17 +0000 |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2007-07-14 13:09:17 +0000 |
commit | 12b3a44a1c2578005349a14bd9fdc49563d9838c (patch) | |
tree | 77227afdac4f88c7ab105ae6cf61f1ed9f942a94 | |
parent | f5a4f2ca64d880b0b20ddf663b1d3de05e238f07 (diff) | |
download | crosstool-ng-12b3a44a1c2578005349a14bd9fdc49563d9838c.tar.gz crosstool-ng-12b3a44a1c2578005349a14bd9fdc49563d9838c.tar.bz2 crosstool-ng-12b3a44a1c2578005349a14bd9fdc49563d9838c.zip |
Upgrade populate.in:
- systematically make paths absolute,
- somewhat beautify the help ;essage,
- explain why ../ is to be seatrched for.
-rw-r--r-- | tools/populate.in | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/tools/populate.in b/tools/populate.in index eb527db2..5180f268 100644 --- a/tools/populate.in +++ b/tools/populate.in @@ -11,7 +11,7 @@ myname=$(basename "$0") doHelp() { cat <<_EOF_ -$myname [ -f ] < -s source_root > < -d destination_root > +$myname [-f] [-v] -s source_root -d destination_root -f force execution: if destination directory already exists, it will be removed first. @@ -78,14 +78,8 @@ fi mkdir -p "${CT_ROOT_DST_DIR}" # Make all path absolute -case "${CT_ROOT_SRC_DIR}" in - /*) ;; - *) CT_ROOT_SRC_DIR=$(cd "${CT_ROOT_SRC_DIR}"; pwd) -esac -case "${CT_ROOT_DST_DIR}" in - /*) ;; - *) CT_ROOT_DST_DIR=$(cd "${CT_ROOT_DST_DIR}"; pwd) -esac +CT_ROOT_SRC_DIR=$(cd "${CT_ROOT_SRC_DIR}"; pwd) +CT_ROOT_DST_DIR=$(cd "${CT_ROOT_DST_DIR}"; pwd) cd "${CT_ROOT_SRC_DIR}" tar cf - . |(cd "${CT_ROOT_DST_DIR}"; tar xf -) @@ -105,6 +99,7 @@ while [ ${still_needed} -eq 1 ]; do ${CT_ECHO} " already present" continue fi + # Need to scan .. for libgcc_s et al. for dir in . usr ..; do ${CT_ECHO} -n " trying in \"${dir}\"" tgt_dir="${dir}" |