Lines 424-429
Link Here
|
424 |
chmod -Rf a+rX,u+w,g-w,o-w . |
424 |
chmod -Rf a+rX,u+w,g-w,o-w . |
425 |
} |
425 |
} |
426 |
|
426 |
|
|
|
427 |
doexe() { |
428 |
local x mysrc |
429 |
|
430 |
[[ -z "$*" ]] && die "doexe: No file specified" |
431 |
|
432 |
if [[ ! -d "${D}${EXEDESTTREE}" ]] ; then |
433 |
install -d "${D}${EXEDESTTREE}" || die "doexe: Failed to create dir '${D}${EXEDESTTREE}'" |
434 |
fi |
435 |
|
436 |
for x in "$@" ; do |
437 |
if [[ -L "${x}" ]] ; then |
438 |
mysrc="${T}"/$(/usr/bin/basename "${x}") |
439 |
rm -rf "${mysrc}" && cp "${x}" "${T}" || die "doexe: Failed to copy ${x} to ${T}" |
440 |
elif [[ -d "${x}" ]] ; then |
441 |
vecho "doexe: Warning, skipping directory ${x}" |
442 |
continue |
443 |
else |
444 |
if [[ -e "${x}" ]] ; then |
445 |
mysrc="${x}" |
446 |
else |
447 |
die "doexe: '${x}' does not exist" |
448 |
fi |
449 |
fi |
450 |
|
451 |
install ${EXEOPTIONS} "${mysrc}" "${D}${EXEDESTTREE}" || die "doexe: Failed to install '${mysrc}'" |
452 |
done |
453 |
} |
454 |
|
455 |
dobin() { |
456 |
local x |
457 |
|
458 |
[[ -z "$*" ]] && die "dobin: No file specified" |
459 |
|
460 |
if [[ ! -d "${D}${DESTTREE}/bin" ]] ; then |
461 |
install -d "${D}${DESTTREE}/bin" || die "dobin: Failed to create dir '${D}${DESTTREE}/bin'" |
462 |
fi |
463 |
|
464 |
for x in "$@" ; do |
465 |
if [[ -e "${x}" ]] ; then |
466 |
install -m0755 -o "${PORTAGE_INST_UID:-0}" -g "${PORTAGE_INST_GID:-0}" "${x}" "${D}${DESTTREE}/bin" || die "dobin: Failed to install '${x}'" |
467 |
else |
468 |
die "dobin: '${x}' does not exist" |
469 |
fi |
470 |
done |
471 |
} |
472 |
|
473 |
dosbin() { |
474 |
local x |
475 |
|
476 |
[[ -z "$*" ]] && die "dosbin: No file specified" |
477 |
|
478 |
if [[ ! -d "${D}${DESTTREE}/sbin" ]] ; then |
479 |
install -d "${D}${DESTTREE}/sbin" || die "dosbin: Failed to create dir '${D}${DESTTREE}/sbin'" |
480 |
fi |
481 |
|
482 |
for x in "$@" ; do |
483 |
if [[ -e "${x}" ]] ; then |
484 |
install -m0755 -o "${PORTAGE_INST_UID:-0}" -g "${PORTAGE_INST_GID:-0}" "${x}" "${D}${DESTTREE}/sbin" || die "dosbin: Failed to install '${x}'" |
485 |
else |
486 |
die "dosbin: '${x}' does not exist" |
487 |
fi |
488 |
done |
489 |
} |
490 |
|
491 |
newbin() { |
492 |
[[ -z "${T}" ]] && die "newbin: \${T} is blank" |
493 |
[[ -z "${1}" || -z "${2}" ]] && die "newbin: Need two arguments, old file and new file" |
494 |
[[ $# -gt 2 ]] && die "newbin: Too many arguments" |
495 |
[[ -e "${1}" ]] || die "newbin: '${1}' does not exist" |
496 |
|
497 |
rm -rf "${T}/${2}" && cp -f "${1}" "${T}/${2}" && dobin "${T}/${2}" || die "newbin: Failed to install '${1}'" |
498 |
} |
499 |
|
500 |
newsbin() { |
501 |
[[ -z "${T}" ]] && die "newsbin: \${T} is blank" |
502 |
[[ -z "${1}" || -z "${2}" ]] && die "newsbin: Need two arguments, old file and new file" |
503 |
[[ $# -gt 2 ]] && die "newsbin: Too many arguments" |
504 |
[[ -e "${1}" ]] || die "newsbin: '${1}' does not exist" |
505 |
|
506 |
rm -rf "${T}/${2}" && cp -f "${1}" "${T}/${2}" && dosbin "${T}/${2}" || die "newsbin: Failed to install '${1}'" |
507 |
} |
508 |
|
509 |
newexe() { |
510 |
[[ -z "${T}" ]] && die "newexe: \${T} is blank" |
511 |
[[ -z "${1}" || -z "${2}" ]] && die "newexe: Need two arguments, old file and new file" |
512 |
[[ $# -gt 2 ]] && die "newexe: Too many arguments" |
513 |
[[ -e "${1}" ]] || die "newexe: '${1}' does not exist" |
514 |
|
515 |
rm -rf "${T}/${2}" && cp -f "${1}" "${T}/${2}" && doexe "${T}/${2}" || die "newexe: Failed to install '${1}'" |
516 |
} |
517 |
|
427 |
strip_duplicate_slashes() { |
518 |
strip_duplicate_slashes() { |
428 |
if [[ -n $1 ]] ; then |
519 |
if [[ -n $1 ]] ; then |
429 |
local removed=$1 |
520 |
local removed=$1 |