#!/bin/bash
    mynum=${#}
    if [ ${mynum} -lt 1 ]
    then
	echo "doexe: at least one argument needed"
   	exit 1
	fi
    if [ ! -d ${D}${EXEDESTTREE} ]
    then
	install -d ${D}${EXEDESTTREE}
    fi
    for x in "$@"
    do
	if [ -z "$DEBUGBUILD" ]
	then
		MYVAL=`file ${x} | grep "ELF"` 
		if [ -n "$MYVAL" ]
		then
			strip ${x}
		fi
	fi
	if [ -L ${x} ]
	then
		cp ${x} ${T}
		mysrc=${T}/`/usr/bin/basename ${x}`
	elif [ -d ${x} ]
	then
		echo "doexe: warning, skipping directory ${x}"
		continue
	else
		mysrc=${x}
	fi
	install ${EXEOPTIONS} ${mysrc} ${D}${EXEDESTTREE}
done


