scripts/finish: do not try to symlink if sed expr is a no-op
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed Jul 07 22:33:49 2010 +0200 (2010-07-07)
changeset 20045d6d3c28a658
parent 2003 b74a48609d81
child 2006 f15068f8ae3b
scripts/finish: do not try to symlink if sed expr is a no-op

If the sed expression does not transform the
tuple, do not try to create the symlink.
scripts/build/internals.sh
     1.1 --- a/scripts/build/internals.sh	Thu Jul 01 01:17:01 2010 +0200
     1.2 +++ b/scripts/build/internals.sh	Wed Jul 07 22:33:49 2010 +0200
     1.3 @@ -31,7 +31,11 @@
     1.4          fi
     1.5          if [ -n "${CT_TARGET_ALIAS_SED_EXPR}" ]; then
     1.6              _t=$(echo "$t" |sed -r -e "${CT_TARGET_ALIAS_SED_EXPR}")
     1.7 -            CT_DoExecLog ALL ln -sv "${t}" "${_t}"
     1.8 +            if [ "${_t}" = "${t}" ]; then
     1.9 +                CT_DoLog WARN "The sed expression '${CT_TARGET_ALIAS_SED_EXPR}' has no effect on '${t}'"
    1.10 +            else
    1.11 +                CT_DoExecLog ALL ln -sv "${t}" "${_t}"
    1.12 +            fi
    1.13          fi
    1.14      done
    1.15      CT_Popd