aboutsummaryrefslogtreecommitdiff
path: root/bin/dobin
diff options
context:
space:
mode:
authorDaniel Robbins <drobbins@gentoo.org>2001-08-26 04:33:43 +0000
committerDaniel Robbins <drobbins@gentoo.org>2001-08-26 04:33:43 +0000
commitb7c9c02ee04ae62068f8db775c1189fd796cd797 (patch)
treef74e3888f1f532240b06cbeff0a716417a1fcdc4 /bin/dobin
downloadportage-cvs-b7c9c02ee04ae62068f8db775c1189fd796cd797.tar.gz
portage-cvs-b7c9c02ee04ae62068f8db775c1189fd796cd797.tar.bz2
portage-cvs-b7c9c02ee04ae62068f8db775c1189fd796cd797.zip
Portage has been added to gentoo-src
Diffstat (limited to 'bin/dobin')
-rwxr-xr-xbin/dobin31
1 files changed, 31 insertions, 0 deletions
diff --git a/bin/dobin b/bin/dobin
new file mode 100755
index 0000000..f1fba6f
--- /dev/null
+++ b/bin/dobin
@@ -0,0 +1,31 @@
+#!/bin/bash
+if [ ${#} -lt 1 ]
+then
+ echo "${0}: at least one argument needed"
+ return
+fi
+if [ ! -d ${D}${DESTTREE}/bin ]
+then
+ install -d ${D}${DESTTREE}/bin
+fi
+for x in "$@"
+do
+ if [ -x ${x} ]
+ then
+ if [ -z "$DEBUG" ]
+ then
+ MYVAL=`file ${x} | grep "ELF"`
+ if [ -n "$MYVAL" ]
+ then
+ strip ${x}
+ fi
+ fi
+ #if executable, use existing perms
+ install ${x} ${D}${DESTTREE}/bin
+ else
+ #otherwise, use reasonable defaults
+ echo ">>> dobin: making ${x} executable..."
+ install -m0755 --owner=root --group=root ${x} ${D}${DESTTREE}/bin
+ fi
+ done
+