Lines 3-26
Link Here
|
3 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# Distributed under the terms of the GNU General Public License v2 |
4 |
# $Id: /var/cvsroot/gentoo-src/portage/bin/doexe,v 1.10.2.1 2004/12/06 03:01:43 carpaski Exp $ |
4 |
# $Id: /var/cvsroot/gentoo-src/portage/bin/doexe,v 1.10.2.1 2004/12/06 03:01:43 carpaski Exp $ |
5 |
|
5 |
|
6 |
mynum=${#} |
6 |
if [ ${#} -lt 1 ] ; then |
7 |
if [ ${mynum} -lt 1 ] ; then |
|
|
8 |
echo "doexe: at least one argument needed" |
7 |
echo "doexe: at least one argument needed" |
9 |
exit 1 |
8 |
exit 1 |
10 |
fi |
9 |
fi |
11 |
if [ ! -d "${D}${EXEDESTTREE}" ] ; then |
10 |
if [ ! -d "${D}${EXEDESTTREE}" ] ; then |
12 |
install -d "${D}${EXEDESTTREE}" |
11 |
install -d "${D}${EXEDESTTREE}" || exit 2 |
13 |
fi |
12 |
fi |
14 |
|
13 |
|
15 |
for x in "$@" ; do |
14 |
for x in "${@}" ; do |
16 |
if [ -L "${x}" ] ; then |
15 |
if [ -L "${x}" ] ; then |
17 |
cp "${x}" "${T}" |
16 |
cp "${x}" "${T}" |
18 |
mysrc="${T}"/`/usr/bin/basename "${x}"` |
17 |
mysrc="${T}"/$(/usr/bin/basename "${x}") |
19 |
elif [ -d "${x}" ] ; then |
18 |
elif [ -d "${x}" ] ; then |
20 |
echo "doexe: warning, skipping directory ${x}" |
19 |
echo "doexe: warning, skipping directory ${x}" |
21 |
continue |
20 |
continue |
22 |
else |
21 |
else |
23 |
mysrc="${x}" |
22 |
mysrc="${x}" |
24 |
fi |
23 |
fi |
25 |
install ${EXEOPTIONS} "${mysrc}" "${D}${EXEDESTTREE}" |
24 |
install ${EXEOPTIONS} "${mysrc}" "${D}${EXEDESTTREE}" || exit 3 |
26 |
done |
25 |
done |