Revert "Apply Mike's suggested patch to fix the setting of +x on copy_to_chroot ...
authorRick Farina (Zero_Chaos) <zerochaos@gentoo.org>
Fri, 2 Nov 2012 00:00:09 +0000 (20:00 -0400)
committerRick Farina (Zero_Chaos) <zerochaos@gentoo.org>
Fri, 2 Nov 2012 00:00:09 +0000 (20:00 -0400)
This reverts commit c57b514c2295df27eafe57dfb1452b486e9c547b.

targets/support/functions.sh

index a0eaae28c391ef0c52e489d981c312d65c23c539..cb70bdd80cb692ee4108ceb9b6b4967273b9857f 100644 (file)
@@ -1,8 +1,19 @@
-copy_to_chroot() {
-       local src_file=$1
-       local dest_dir=${clst_chroot_path}${2:-/tmp}
-       echo "copying ${src_file##*/} to ${dest_dir}"
-       cp -pPR "${src_file}" "${dest_dir}"/
+copy_to_chroot(){
+       local file_name=$(basename ${1})
+       local dest_dir=${clst_chroot_path}${2}
+       if [ "${2}" != "" ]
+       then
+               echo "copying ${file_name} to ${dest_dir}"
+               mkdir -p ${dest_dir}
+               cp -pPR ${1} ${dest_dir}
+               [ "${file_name}" != "make.profile" ] && \
+                       chmod 755 ${dest_dir}/${file_name}
+       else
+               echo "copying ${file_name} to ${clst_chroot_path}/tmp"
+               mkdir -p ${chroot_path}/tmp
+               cp -pPR ${1} ${clst_chroot_path}/tmp
+               chmod 755 ${clst_chroot_path}/tmp/${file_name}
+       fi
 }
 
 delete_from_chroot(){