sys-apps/yarn: make scripts executable for bug 614094
authorZac Medico <zmedico@gentoo.org>
Sat, 29 Apr 2017 00:39:59 +0000 (17:39 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 29 Apr 2017 00:39:59 +0000 (17:39 -0700)
Package-Manager: Portage-2.3.5, Repoman-2.3.2

sys-apps/yarn/yarn-0.21.3-r1.ebuild [moved from sys-apps/yarn/yarn-0.21.3.ebuild with 73% similarity]

similarity index 73%
rename from sys-apps/yarn/yarn-0.21.3.ebuild
rename to sys-apps/yarn/yarn-0.21.3-r1.ebuild
index 94506663bdecb713e0ac06f256eb9063cc444535..631ba960a3156ca4ef069c1f1bd24f02e9ccc608 100644 (file)
@@ -19,9 +19,13 @@ DEPEND="${RDEPEND}"
 S="${WORKDIR}/dist"
 
 src_install() {
-       local install_dir="/usr/$(get_libdir)/node_modules/yarn"
+       local install_dir="/usr/$(get_libdir)/node_modules/yarn" path
        insinto "${install_dir}"
        doins -r .
        dosym "../$(get_libdir)/node_modules/yarn/bin/yarn.js" "/usr/bin/yarn"
        fperms a+x "${install_dir}/bin/yarn.js"
+       while read -r -d '' path; do
+               [[ $(head -n1 "${path}") == \#\!* ]] || continue
+               chmod +x "${path}" || die #614094
+       done < <(find "${ED}" -type f -print0)
 }