Browse Source

sde-build-tools: move strip_wrapper into a separated file and fix bashism

Signed-off-by: Alejandro Mery <amery@geeks.cl>
stable/0.6
Alejandro Mery 11 years ago
parent
commit
f5c7b17123
2 changed files with 29 additions and 16 deletions
  1. +2
    -16
      bin/sde-build-tools
  2. +27
    -0
      src/tools-source/strip_wrapper.sh

+ 2
- 16
bin/sde-build-tools

@ -228,22 +228,8 @@ if [ ! -f $TOOLSDIR/.lastupdate ] ; then
$( get_reverted `get_expanded target/%/. $targetchain` ) -name 'wrappers.in' )
#
echo_status "Building $toolsdir/wrapper/strip_wrapper."
cat << EOT > $TOOLSDIR/wrapper/strip_wrapper.$$
#!/bin/sh
if [ "\$STRIP_WRAPPER_NOLOOP" = 1 ] ; then
echo "Aaaaaeik! Strip wrapper is looping!" >&2
exit 1
fi
if [ "\$SDECFG_DEBUG" = 0 ] ; then
PATH=\${PATH//\$STRIP_WRAPPER_MYPATH:/}
export STRIP_WRAPPER_NOLOOP=1
exec "\$( basename \$0 )" "\$@"
fi
exit 0
EOT
chmod +x $TOOLSDIR/wrapper/strip_wrapper.$$
mv $TOOLSDIR/wrapper/strip_wrapper.$$ \
$TOOLSDIR/wrapper/strip_wrapper
cp src/tools-source/strip_wrapper.sh $TOOLSDIR/wrapper/strip_wrapper
chmod +x $TOOLSDIR/wrapper/strip_wrapper
wrappers="$wrappers strip_wrapper"
#
for x in strip $arch_target-strip ; do

+ 27
- 0
src/tools-source/strip_wrapper.sh

@ -0,0 +1,27 @@
#!/bin/sh
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: bin/sde-build-tools
# Copyright (C) 2006 - 2013 The OpenSDE Project
# Copyright (C) 2004 - 2006 The T2 SDE Project
# Copyright (C) 1998 - 2003 Clifford Wolf
#
# More information can be found in the files COPYING and README.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
if [ "$STRIP_WRAPPER_NOLOOP" = 1 ] ; then
echo "Aaaaaeik! Strip wrapper is looping!" >&2
exit 1
fi
if [ "$SDECFG_DEBUG" = 0 ] ; then
PATH=$(echo $PATH | sed -e "s|$STRIP_WRAPPER_MYPATH:||")
export STRIP_WRAPPER_NOLOOP=1
exec "$(basename $0)" "$@"
fi
exit 0

Loading…
Cancel
Save