scripts/crosstool-NG.sh.in
changeset 1421 71a85f37efbc
parent 1420 0e49e6eddac4
child 1423 7f5563e3ec2d
     1.1 --- a/scripts/crosstool-NG.sh.in	Tue Jun 23 22:52:14 2009 +0200
     1.2 +++ b/scripts/crosstool-NG.sh.in	Tue Jun 23 22:56:39 2009 +0200
     1.3 @@ -60,6 +60,12 @@
     1.4  CT_TestAndAbort "Your file system in '${CT_WORK_DIR}' is *not* case-sensitive!" -f "${CT_WORK_DIR}/FOO"
     1.5  CT_DoExecLog DEBUG rm -f "${CT_WORK_DIR}/foo"
     1.6  
     1.7 +# What's our shell?
     1.8 +# Will be plain /bin/sh on most systems, except if we have /bin/ash and we
     1.9 +# _explictly_ required using it
    1.10 +CT_SHELL="/bin/sh"
    1.11 +[ "${CT_CONFIG_SHELL_ASH}" = "y" -a -x "/bin/ash" ] && CT_SHELL="/bin/ash"
    1.12 +
    1.13  # Create the bin-overide early
    1.14  # Contains symlinks to the tools found by ./configure
    1.15  # Note: CT_DoLog and CT_DoExecLog do not use any of those tool, so
    1.16 @@ -71,7 +77,7 @@
    1.17      tool="${line%%=*}"
    1.18      path="${line#*=}"
    1.19      CT_DoLog DEBUG "  '${tool}' -> '${path}'"
    1.20 -    printf "#${BANG}/bin/sh\nexec '${path}' \"\${@}\"\n" >"${CT_BIN_OVERIDE_DIR}/${tool}"
    1.21 +    printf "#${BANG}${CT_SHELL}\nexec '${path}' \"\${@}\"\n" >"${CT_BIN_OVERIDE_DIR}/${tool}"
    1.22      CT_DoExecLog ALL chmod 700 "${CT_BIN_OVERIDE_DIR}/${tool}"
    1.23  done
    1.24  export PATH="${CT_BIN_OVERIDE_DIR}:${PATH}"
    1.25 @@ -250,12 +256,6 @@
    1.26  
    1.27  # Setting up the rest of the environment only if not restarting
    1.28  if [ -z "${CT_RESTART}" ]; then
    1.29 -    # What's our shell?
    1.30 -    # Will be plain /bin/sh on most systems, except if we have /bin/ash and we
    1.31 -    # _explictly_ required using it
    1.32 -    CT_SHELL="/bin/sh"
    1.33 -    [ "${CT_CONFIG_SHELL_ASH}" = "y" -a -x "/bin/ash" ] && CT_SHELL="/bin/ash"
    1.34 -
    1.35      # Arrange paths depending on wether we use sys-root or not.
    1.36      if [ "${CT_USE_SYSROOT}" = "y" ]; then
    1.37          CT_SYSROOT_DIR="${CT_PREFIX_DIR}/${CT_TARGET}/${CT_SYSROOT_DIR_PREFIX}/sys-root"
    1.38 @@ -425,7 +425,7 @@
    1.39      # Go ahead with those, by creating a wrapper that keeps partial files, and that
    1.40      # never fails:
    1.41      CT_DoLog DEBUG "  'makeinfo' -> '$(CT_Which makeinfo)'"
    1.42 -    printf "#${BANG}/bin/sh\n$(CT_Which makeinfo) --force \"\${@}\"\ntrue\n" >"${CT_PREFIX_DIR}/bin/makeinfo"
    1.43 +    printf "#${BANG}${CT_SHELL}\n$(CT_Which makeinfo) --force \"\${@}\"\ntrue\n" >"${CT_PREFIX_DIR}/bin/makeinfo"
    1.44      CT_DoExecLog ALL chmod 700 "${CT_PREFIX_DIR}/bin/makeinfo"
    1.45  
    1.46      # Help gcc